diff --git a/src/chatroom-discovery-dialog.cpp b/src/chatroom-discovery-dialog.cpp
new file mode 100644
index 0000000..327e4e7
--- /dev/null
+++ b/src/chatroom-discovery-dialog.cpp
@@ -0,0 +1,187 @@
+#include "chatroom-discovery-dialog.hpp"
+#include "ui_chatroom-discovery-dialog.h"
+
+namespace chronos {
+
+using std::vector;
+using ndn::Name;
+
+ChatroomDiscoveryDialog::ChatroomDiscoveryDialog(QWidget* parent)
+  : QDialog(parent)
+  , ui(new Ui::ChatroomDiscoveryDialog)
+  , m_standardItemModel(new QStandardItemModel(0, 3, this))
+  , m_chatroomDiscoveryViewDialog(new ChatroomDiscoveryViewDialog)
+{
+  ui->setupUi(this);
+
+  connect(ui->cancelButton, SIGNAL(clicked()),
+          this, SLOT(onCancelButtonClicked()));
+  connect(ui->joinButton, SIGNAL(clicked()),
+          this, SLOT(onJoinButtonClicked()));
+  connect(ui->viewButton, SIGNAL(clicked()),
+          this, SLOT(onViewButtonClicked()));
+  connect(ui->chatroomListView, SIGNAL(clicked(QModelIndex)),
+          this, SLOT(onChatroomListViewClicked(QModelIndex)));
+  connect(ui->chatroomListView, SIGNAL(doubleClicked(QModelIndex)),
+          this, SLOT(onChatroomListViewDoubleClicked(QModelIndex)));
+
+  updateChatroomList();
+}
+
+ChatroomDiscoveryDialog::~ChatroomDiscoveryDialog()
+{
+  delete ui;
+}
+
+void
+ChatroomDiscoveryDialog::updateChatroomList()
+{
+  m_standardItemModel->clear();
+
+  m_standardItemModel
+    ->setHorizontalHeaderItem(0, new QStandardItem(QString("Chatroom Name")));
+  m_standardItemModel
+    ->setHorizontalHeaderItem(1, new QStandardItem(QString("Chatroom Trust Model")));
+  m_standardItemModel
+    ->setHorizontalHeaderItem(2, new QStandardItem(QString("Participants or Contacts")));
+
+  QHeaderView *m_headerView = ui->chatroomListView->horizontalHeader();
+  m_headerView->setResizeMode((QHeaderView::ResizeMode)3);
+  m_headerView->setStretchLastSection(true);
+
+  ui->chatroomListView->setModel(m_standardItemModel);
+
+  int i = 0;
+  for (Chatrooms::const_iterator it = m_chatrooms.begin();
+       it != m_chatrooms.end(); ++it, ++i) {
+    QStandardItem *item = new QStandardItem(QString::fromStdString(it->first.toUri()));
+    item->setEditable(false);
+    m_standardItemModel->setItem(i, 0, item);
+
+    if (it->second.getTrustModel() == ChatroomInfo::TRUST_MODEL_WEBOFTRUST)
+      item = new QStandardItem(QString("Web of trust"));
+    else
+      item = new QStandardItem(QString("Hierarchical"));
+    item->setEditable(false);
+    m_standardItemModel->setItem(i, 1, item);
+
+    QString content;
+
+    for (vector<Name>::const_iterator nameIt = it->second.getParticipants().begin();
+         nameIt != it->second.getParticipants().end(); nameIt++) {
+      content.append(QString::fromStdString(nameIt->toUri())).append(",");
+    }
+    item = new QStandardItem(content);
+    item->setEditable(false);
+    m_standardItemModel->setItem(i, 2, item);
+  }
+}
+
+void
+ChatroomDiscoveryDialog::onDiscoverChatroomChanged(const chronos::ChatroomInfo& info, bool isAdd)
+{
+  if (isAdd)
+    m_chatrooms[info.getName()] = info;
+  else
+    m_chatrooms.erase(info.getName());
+
+  updateChatroomList();
+}
+
+void
+ChatroomDiscoveryDialog::onCancelButtonClicked()
+{
+  this->close();
+}
+
+void
+ChatroomDiscoveryDialog::onJoinButtonClicked()
+{
+  if(ui->chatroomListView->selectionModel()->selectedRows().size() == 0) {
+    QMessageBox::information(this, tr("ChronoChat"), tr("Please select a chatroom to join"));
+  }
+  else {
+    m_selectedRow = ui->chatroomListView->selectionModel()->selectedRows()[0].row();
+    QStandardItem* selectedChatroomName = m_standardItemModel->item(m_selectedRow, 0);
+    emit startChatroom(selectedChatroomName->text(), false);
+
+    {
+      // Tmp disabled
+      // QStandardItem* selectedChatroomTrustModel = m_standardItemModel->item(m_selectedRow, 1);
+      // if(selectedChatroomTrustModel->text() == "Hierarchical") {
+      //   emit startChatroom(selectedChatroomName->text(), false);
+      // }
+      // else if(selectedChatroomTrustModel->text() == "Web of trust") {
+      //   ChatroomDiscoveryLogic::ChatroomList::const_iterator it;
+      //   it = m_chatroomList->find(Name::Component(selectedChatroomName->text().toStdString()));
+
+      //   if(it->second.getContacts().size() == 0) {
+      //     QMessageBox messageBox;
+      //     messageBox.addButton(QMessageBox::Ok);
+      //     messageBox.setIcon(QMessageBox::Information);
+      //     messageBox.setText
+      //       ("You do not have a contact in this chatroom. Please choose another chatroom to join");
+      //     messageBox.exec();
+      //   }
+      //   else {
+      //     m_sendInvitationRequestDialog->setChatroomName(selectedChatroomName->text());
+      //     m_sendInvitationRequestDialog->setContacts(it->second.getContacts());
+      //     m_sendInvitationRequestDialog->show();
+      //   }
+      // }
+    }
+  }
+}
+
+void
+ChatroomDiscoveryDialog::onChatroomListViewDoubleClicked(const QModelIndex &index)
+{
+  onJoinButtonClicked();
+}
+
+void
+ChatroomDiscoveryDialog::onChatroomListViewClicked(const QModelIndex &index)
+{
+  ui->chatroomListView->selectRow(index.row());
+  m_selectedRow = index.row();
+}
+
+void
+ChatroomDiscoveryDialog::onViewButtonClicked()
+{
+  if(ui->chatroomListView->selectionModel()->selectedRows().size() == 0) {
+    QMessageBox messageBox;
+    messageBox.addButton(QMessageBox::Ok);
+    messageBox.setIcon(QMessageBox::Information);
+    messageBox.setText("Please select a chatroom to view");
+    messageBox.exec();
+  }
+  else {
+    m_selectedRow = ui->chatroomListView->selectionModel()->selectedRows()[0].row();
+
+    QStandardItem* selectedChatroomName = m_standardItemModel->item(m_selectedRow);
+    m_chatroomDiscoveryViewDialog->setChatroomName(selectedChatroomName->text());
+
+    // QStandardItem *m_selectedTrustModel = m_standardItemModel->item(m_selectedRow, 1);
+    // m_chatroomDiscoveryViewDialog->setChatroomTrustModel(m_selectedTrustModel->text());
+
+    //use chatroomlist as parameter to call set participants
+    //maybe for different chatroom with different trust model???
+    //participants can be contacts
+
+    Chatrooms::const_iterator it =
+      m_chatrooms.find(Name::Component(selectedChatroomName->text().toStdString()));
+
+    if (it != m_chatrooms.end()) {
+      m_chatroomDiscoveryViewDialog->setChatroomParticipants(it->second.getParticipants());
+      m_chatroomDiscoveryViewDialog->show();
+    }
+  }
+}
+
+} // namespace chronos
+
+
+#if WAF
+#include "chatroom-discovery-dialog.moc"
+#endif
diff --git a/src/chatroom-discovery-dialog.hpp b/src/chatroom-discovery-dialog.hpp
new file mode 100644
index 0000000..0193cbd
--- /dev/null
+++ b/src/chatroom-discovery-dialog.hpp
@@ -0,0 +1,87 @@
+/* -*- 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: Mengjin Yan <jane.yan0129@gmail.com>
+ * Author: Yingdi Yu <yingdi@cs.ucla.edu>
+ */
+#ifndef CHRONOCHAT_CHATROOM_DISCOVERY_DIALOG_HPP
+#define CHRONOCHAT_CHATROOM_DISCOVERY_DIALOG_HPP
+
+#include <QDialog>
+#include <QModelIndex>
+#include <QStandardItem>
+#include <QHeaderView>
+#include <QMessageBox>
+#include <QDebug>
+#include "chatroom-discovery-view-dialog.hpp"
+
+#ifndef Q_MOC_RUN
+#include "chatroom-info.hpp"
+#endif
+
+namespace Ui {
+class ChatroomDiscoveryDialog;
+}
+
+namespace chronos {
+
+class ChatroomDiscoveryDialog : public QDialog
+{
+  Q_OBJECT
+
+public:
+  explicit
+  ChatroomDiscoveryDialog(QWidget* parent = 0);
+
+  ~ChatroomDiscoveryDialog();
+
+  void
+  updateChatroomList();
+
+signals:
+  void
+  startChatroom(const QString& chatroomName, bool secured);
+
+public slots:
+  void
+  onDiscoverChatroomChanged(const chronos::ChatroomInfo& chatroom, bool isAdd);
+
+private slots:
+  void
+  onCancelButtonClicked();
+
+  void
+  onJoinButtonClicked();
+
+  void
+  onViewButtonClicked();
+
+  void
+  onChatroomListViewDoubleClicked(const QModelIndex& index);
+
+  void
+  onChatroomListViewClicked(const QModelIndex& index);
+
+private:
+
+  typedef std::map<Name::Component, ChatroomInfo> Chatrooms;
+
+  Ui::ChatroomDiscoveryDialog *ui;
+  QStandardItemModel* m_standardItemModel;
+
+  int m_selectedRow;
+
+  Chatrooms m_chatrooms;
+
+
+
+  ChatroomDiscoveryViewDialog* m_chatroomDiscoveryViewDialog;
+};
+
+} //namespace chronos
+
+#endif // CHRONOCHAT_CHATROOM_DISCOVERY_DIALOG_HPP
diff --git a/src/chatroom-discovery-dialog.ui b/src/chatroom-discovery-dialog.ui
new file mode 100644
index 0000000..66df7ae
--- /dev/null
+++ b/src/chatroom-discovery-dialog.ui
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ChatroomDiscoveryDialog</class>
+ <widget class="QDialog" name="ChatroomDiscoveryDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>570</width>
+    <height>503</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>ChatroomDiscoveryDialog</string>
+  </property>
+  <widget class="QLabel" name="introLabel">
+   <property name="geometry">
+    <rect>
+     <x>50</x>
+     <y>30</y>
+     <width>451</width>
+     <height>16</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Here are the ongoing chatrooms:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+   </property>
+  </widget>
+  <widget class="QTableView" name="chatroomListView">
+   <property name="geometry">
+    <rect>
+     <x>40</x>
+     <y>60</y>
+     <width>491</width>
+     <height>371</height>
+    </rect>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="viewButton">
+   <property name="geometry">
+    <rect>
+     <x>260</x>
+     <y>450</y>
+     <width>91</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="contextMenuPolicy">
+    <enum>Qt::DefaultContextMenu</enum>
+   </property>
+   <property name="text">
+    <string>View</string>
+   </property>
+   <property name="autoDefault">
+    <bool>false</bool>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="joinButton">
+   <property name="geometry">
+    <rect>
+     <x>360</x>
+     <y>450</y>
+     <width>91</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Join</string>
+   </property>
+   <property name="autoDefault">
+    <bool>false</bool>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="cancelButton">
+   <property name="geometry">
+    <rect>
+     <x>460</x>
+     <y>450</y>
+     <width>91</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Cancel</string>
+   </property>
+   <property name="autoDefault">
+    <bool>false</bool>
+   </property>
+  </widget>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/chatroom-discovery-view-dialog.cpp b/src/chatroom-discovery-view-dialog.cpp
new file mode 100644
index 0000000..7eff07b
--- /dev/null
+++ b/src/chatroom-discovery-view-dialog.cpp
@@ -0,0 +1,70 @@
+/* -*- 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: Mengjin Yan <jane.yan0129@gmail.com>
+ * Author: Yingdi Yu <yingdi@cs.ucla.edu>
+ */
+#include "chatroom-discovery-view-dialog.hpp"
+#include "ui_chatroom-discovery-view-dialog.h"
+
+namespace chronos {
+
+using std::vector;
+using ndn::Name;
+
+ChatroomDiscoveryViewDialog::ChatroomDiscoveryViewDialog(QWidget* parent)
+  : QDialog(parent)
+  , ui(new Ui::ChatroomDiscoveryViewDialog)
+{
+  ui->setupUi(this);
+
+  ui->participantsBrowser->setReadOnly(true);
+
+  connect(ui->closeButton, SIGNAL(clicked()),
+          this, SLOT(onCloseButtonClicked()));
+}
+
+ChatroomDiscoveryViewDialog::~ChatroomDiscoveryViewDialog()
+{
+  delete ui;
+}
+
+void
+ChatroomDiscoveryViewDialog::onCloseButtonClicked()
+{
+  this->close();
+}
+
+void
+ChatroomDiscoveryViewDialog::setChatroomName(QString chatroomName)
+{
+  ui->chatroomNameLabel->setText("Chatroom Name: "+chatroomName);
+}
+
+void
+ChatroomDiscoveryViewDialog::setChatroomTrustModel(QString chatroomTrustModel)
+{
+  ui->chatroomTrustModelLabel->setText("Chatroom Trust Model: "+chatroomTrustModel);
+}
+
+void
+ChatroomDiscoveryViewDialog::setChatroomParticipants(const vector<Name>& participants)
+{
+  QString content;
+  for (vector<Name>::const_iterator it = participants.begin();
+       it != participants.end(); it++) {
+    content.append(QString::fromStdString(it->toUri())).append("\n");
+  }
+
+  ui->participantsBrowser->setPlainText(content);
+}
+
+} // namespace chronos
+
+#if WAF
+#include "chatroom-discovery-view-dialog.moc"
+#endif
diff --git a/src/chatroom-discovery-view-dialog.hpp b/src/chatroom-discovery-view-dialog.hpp
new file mode 100644
index 0000000..d074e71
--- /dev/null
+++ b/src/chatroom-discovery-view-dialog.hpp
@@ -0,0 +1,55 @@
+/* -*- 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: Mengjin Yan <jane.yan0129@gmail.com>
+ * Author: Yingdi Yu <yingdi@cs.ucla.edu>
+ */
+
+#ifndef CHRONOCHAT_CHATROOM_DISCOVERY_VIEW_DIALOG_HPP
+#define CHRONOCHAT_CHATROOM_DISCOVERY_VIEW_DIALOG_HPP
+
+#include <QDialog>
+
+#ifndef Q_MOC_RUN
+#include "common.hpp"
+#endif
+
+namespace Ui {
+class ChatroomDiscoveryViewDialog;
+}
+
+namespace chronos {
+
+class ChatroomDiscoveryViewDialog : public QDialog
+{
+  Q_OBJECT
+
+public:
+  explicit ChatroomDiscoveryViewDialog(QWidget* parent = 0);
+  ~ChatroomDiscoveryViewDialog();
+
+  void
+  setChatroomName(QString chatroomName);
+
+  void
+  setChatroomTrustModel(QString chatroomTrustModel);
+
+  void
+  setChatroomParticipants(const std::vector<ndn::Name>& chatroomParticipants);
+
+
+private slots:
+  void
+  onCloseButtonClicked();
+
+private:
+  Ui::ChatroomDiscoveryViewDialog* ui;
+};
+
+} //namespace chronos
+
+#endif // CHRONOCHAT_CHATROOM_DISCOVERY_VIEW_DIALOG_HPP
diff --git a/src/chatroom-discovery-view-dialog.ui b/src/chatroom-discovery-view-dialog.ui
new file mode 100644
index 0000000..74d6d94
--- /dev/null
+++ b/src/chatroom-discovery-view-dialog.ui
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ChatroomDiscoveryViewDialog</class>
+ <widget class="QDialog" name="ChatroomDiscoveryViewDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>514</width>
+    <height>402</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>ViewChatroom</string>
+  </property>
+  <widget class="QLabel" name="chatroomNameLabel">
+   <property name="geometry">
+    <rect>
+     <x>40</x>
+     <y>50</y>
+     <width>431</width>
+     <height>16</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="text">
+    <string/>
+   </property>
+  </widget>
+  <widget class="QLabel" name="chatroomTrustModelLabel">
+   <property name="geometry">
+    <rect>
+     <x>40</x>
+     <y>80</y>
+     <width>431</width>
+     <height>16</height>
+    </rect>
+   </property>
+  </widget>
+  <widget class="QLabel" name="chatroomParcitipantsLabel">
+   <property name="geometry">
+    <rect>
+     <x>40</x>
+     <y>110</y>
+     <width>171</width>
+     <height>16</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Participants or Contacts:</string>
+   </property>
+  </widget>
+  <widget class="QTextBrowser" name="participantsBrowser">
+   <property name="geometry">
+    <rect>
+     <x>40</x>
+     <y>140</y>
+     <width>431</width>
+     <height>192</height>
+    </rect>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="closeButton">
+   <property name="geometry">
+    <rect>
+     <x>360</x>
+     <y>350</y>
+     <width>114</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Close</string>
+   </property>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/controller.cpp b/src/controller.cpp
index 2ecae87..22af126 100644
--- a/src/controller.cpp
+++ b/src/controller.cpp
@@ -13,6 +13,7 @@
 #include <QDir>
 #include <QTimer>
 #include "controller.hpp"
+//#include "chatroom-discovery.h"
 
 #ifndef Q_MOC_RUN
 #include <boost/filesystem.hpp>
@@ -31,6 +32,7 @@
 Q_DECLARE_METATYPE(Chronos::EndorseInfo)
 Q_DECLARE_METATYPE(ndn::Interest)
 Q_DECLARE_METATYPE(size_t)
+Q_DECLARE_METATYPE(chronos::ChatroomInfo)
 
 namespace chronos {
 
@@ -50,6 +52,8 @@
   , m_face(face)
   , m_invitationListenerId(0)
   , m_contactManager(m_face)
+  , m_discoveryLogic(m_face,
+                     bind(&Controller::updateDiscoveryList, this, _1, _2))
   , m_settingDialog(new SettingDialog)
   , m_startChatDialog(new StartChatDialog)
   , m_profileEditor(new ProfileEditor)
@@ -57,12 +61,14 @@
   , m_contactPanel(new ContactPanel)
   , m_browseContactDialog(new BrowseContactDialog)
   , m_addContactPanel(new AddContactPanel)
+  , m_chatroomDiscoveryDialog(new ChatroomDiscoveryDialog)
 {
   qRegisterMetaType<ndn::Name>("ndn.Name");
   qRegisterMetaType<ndn::IdentityCertificate>("ndn.IdentityCertificate");
   qRegisterMetaType<Chronos::EndorseInfo>("Chronos.EndorseInfo");
   qRegisterMetaType<ndn::Interest>("ndn.Interest");
   qRegisterMetaType<size_t>("size_t");
+  qRegisterMetaType<chronos::ChatroomInfo>("chronos.Chatroom");
 
   connect(this, SIGNAL(localPrefixUpdated(const QString&)),
           this, SLOT(onLocalPrefixUpdated(const QString&)));
@@ -156,6 +162,14 @@
           m_contactPanel, SLOT(onContactInfoReady(const QString&, const QString&,
                                                   const QString&, bool)));
 
+  // Connection to DiscoveryDialog
+  connect(this,
+          SIGNAL(discoverChatroomChanged(const chronos::ChatroomInfo&, bool)),
+          m_chatroomDiscoveryDialog,
+          SLOT(onDiscoverChatroomChanged(const chronos::ChatroomInfo&, bool)));
+  connect(m_chatroomDiscoveryDialog, SIGNAL(startChatroom(const QString&, bool)),
+          this, SLOT(onStartChatroom(const QString&, bool)));
+
   initialize();
 
   createTrayIcon();
@@ -219,6 +233,8 @@
   emit identityUpdated(QString(m_identity.toUri().c_str()));
 
   setInvitationListener();
+
+  m_discoveryLogic.sendDiscoveryInterest();
 }
 
 void
@@ -295,6 +311,9 @@
   m_startChatroom = new QAction(tr("Start new chat"), this);
   connect(m_startChatroom, SIGNAL(triggered()), this, SLOT(onStartChatAction()));
 
+  m_discoveryAction = new QAction(tr("Ongoing Chatrooms"), this);
+  connect(m_discoveryAction, SIGNAL(triggered()), this, SLOT(onDiscoveryAction()));
+
   m_settingsAction = new QAction(tr("Settings"), this);
   connect(m_settingsAction, SIGNAL(triggered()), this, SLOT(onSettingsAction()));
 
@@ -315,6 +334,7 @@
 
   m_quitAction = new QAction(tr("Quit"), this);
   connect(m_quitAction, SIGNAL(triggered()), this, SLOT(onQuitAction()));
+
 }
 
 void
@@ -324,6 +344,8 @@
 
   m_trayIconMenu = new QMenu(this);
   m_trayIconMenu->addAction(m_startChatroom);
+  m_trayIconMenu->addAction(m_discoveryAction);
+
   m_trayIconMenu->addSeparator();
   m_trayIconMenu->addAction(m_settingsAction);
   m_trayIconMenu->addAction(m_editProfileAction);
@@ -354,6 +376,8 @@
   QMenu* closeMenu = 0;
 
   menu->addAction(m_startChatroom);
+  menu->addAction(m_discoveryAction);
+
   menu->addSeparator();
   menu->addAction(m_settingsAction);
   menu->addAction(m_editProfileAction);
@@ -400,8 +424,9 @@
     .trimmed();
 
   Name localPrefix(localPrefixStr.toStdString());
-  if (m_localPrefix.empty() || m_localPrefix != localPrefix)
+  if (m_localPrefix.empty() || m_localPrefix != localPrefix) {
     emit localPrefixUpdated(localPrefixStr);
+  }
 }
 
 void
@@ -410,8 +435,9 @@
   QString localPrefixStr("/private/local");
 
   Name localPrefix(localPrefixStr.toStdString());
-  if (m_localPrefix.empty() || m_localPrefix != localPrefix)
+  if (m_localPrefix.empty() || m_localPrefix != localPrefix) {
     emit localPrefixUpdated(localPrefixStr);
+  }
 }
 
 void
@@ -481,18 +507,22 @@
 Controller::addChatDialog(const QString& chatroomName, ChatDialog* chatDialog)
 {
   m_chatDialogList[chatroomName.toStdString()] = chatDialog;
+  m_discoveryLogic.addLocalChatroom(*chatDialog->getChatroomInfo());
   connect(chatDialog, SIGNAL(closeChatDialog(const QString&)),
           this, SLOT(onRemoveChatDialog(const QString&)));
   connect(chatDialog, SIGNAL(showChatMessage(const QString&, const QString&, const QString&)),
           this, SLOT(onShowChatMessage(const QString&, const QString&, const QString&)));
   connect(chatDialog, SIGNAL(resetIcon()),
           this, SLOT(onResetIcon()));
+  connect(chatDialog, SIGNAL(rosterChanged(const chronos::ChatroomInfo&)),
+          this, SLOT(onRosterChanged(const chronos::ChatroomInfo&)));
   connect(this, SIGNAL(localPrefixUpdated(const QString&)),
           chatDialog, SLOT(onLocalPrefixUpdated(const QString&)));
 
   QAction* chatAction = new QAction(chatroomName, this);
   m_chatActionList[chatroomName.toStdString()] = chatAction;
-  connect(chatAction, SIGNAL(triggered()), chatDialog, SLOT(raise()));
+  connect(chatAction, SIGNAL(triggered()),
+          chatDialog, SLOT(raise()));//ymj
 
   QAction* closeAction = new QAction(chatroomName, this);
   m_closeActionList[chatroomName.toStdString()] = closeAction;
@@ -501,7 +531,12 @@
   updateMenu();
 }
 
-// private slots:
+void
+Controller::updateDiscoveryList(const ChatroomInfo& info, bool isAdd)
+{
+  emit discoverChatroomChanged(info, isAdd);
+}
+
 void
 Controller::onIdentityUpdated(const QString& identity)
 {
@@ -571,6 +606,17 @@
 }
 
 void
+Controller::onDiscoveryAction()
+{
+  m_discoveryLogic.sendDiscoveryInterest();
+
+  m_chatroomDiscoveryDialog->updateChatroomList();
+  m_chatroomDiscoveryDialog->show();
+  m_chatroomDiscoveryDialog->raise();
+}
+
+
+void
 Controller::onSettingsAction()
 {
   m_settingDialog->setNick(QString(m_nick.c_str()));
@@ -675,16 +721,22 @@
     return;
   }
 
-  // TODO: We should create a chatroom specific key/cert (which should be created in the first half of this method, but let's use the default one for now.
-  shared_ptr<IdentityCertificate> idCert = m_keyChain.getCertificate(m_keyChain.getDefaultCertificateNameForIdentity(m_identity));
-  ChatDialog* chatDialog = new ChatDialog(&m_contactManager, m_face, *idCert, chatroomPrefix, m_localPrefix, m_nick, secured);
+  // TODO: We should create a chatroom specific key/cert
+  //(which should be created in the first half of this method
+  //, but let's use the default one for now.
+  // std::cout << "start chat room localprefix: " << m_localPrefix.toUri() << std::endl;
+  shared_ptr<IdentityCertificate> idCert
+    = m_keyChain.getCertificate(m_keyChain.getDefaultCertificateNameForIdentity(m_identity));
+  ChatDialog* chatDialog
+    = new ChatDialog(&m_contactManager, m_face, *idCert, chatroomPrefix
+                     , m_localPrefix, m_nick, secured);
 
   addChatDialog(chatroomName, chatDialog);
   chatDialog->show();
 }
 
 void
-Controller::onInvitationResponded(const Name& invitationName, bool accepted)
+Controller::onInvitationResponded(const ndn::Name& invitationName, bool accepted)
 {
   Data response;
   shared_ptr<IdentityCertificate> chatroomCert;
@@ -696,8 +748,10 @@
 
     response.setName(responseName);
 
-    // We should create a particular certificate for this chatroom, but let's use default one for now.
-    chatroomCert = m_keyChain.getCertificate(m_keyChain.getDefaultCertificateNameForIdentity(m_identity));
+    // We should create a particular certificate for this chatroom,
+    //but let's use default one for now.
+    chatroomCert
+      = m_keyChain.getCertificate(m_keyChain.getDefaultCertificateNameForIdentity(m_identity));
 
     response.setContent(chatroomCert->wireEncode());
     response.setFreshnessPeriod(time::milliseconds(1000));
@@ -738,9 +792,14 @@
       .append("ChronoChat")
       .append(invitation.getChatroom());
 
-    //We should create a chatroom specific key/cert (which should be created in the first half of this method, but let's use the default one for now.
-    shared_ptr<IdentityCertificate> idCert = m_keyChain.getCertificate(m_keyChain.getDefaultCertificateNameForIdentity(m_identity));
-    ChatDialog* chatDialog = new ChatDialog(&m_contactManager, m_face, *idCert, chatroomPrefix, m_localPrefix, m_nick, true);
+    //We should create a chatroom specific key/cert
+    //(which should be created in the first half of this method,
+    //but let's use the default one for now.
+    shared_ptr<IdentityCertificate> idCert
+      = m_keyChain.getCertificate(m_keyChain.getDefaultCertificateNameForIdentity(m_identity));
+    ChatDialog* chatDialog
+      = new ChatDialog(&m_contactManager, m_face, *idCert,
+                       chatroomPrefix, m_localPrefix, m_nick, true);
     chatDialog->addSyncAnchor(invitation);
 
     addChatDialog(QString::fromStdString(invitation.getChatroom()), chatDialog);
@@ -773,6 +832,7 @@
     if (deletedChat)
       delete deletedChat;
     m_chatDialogList.erase(it);
+    m_discoveryLogic.removeLocalChatroom(Name::Component(chatroomName.toStdString()));
 
     QAction* chatAction = m_chatActionList[chatroomName.toStdString()];
     QAction* closeAction = m_closeActionList[chatroomName.toStdString()];
@@ -802,8 +862,8 @@
 }
 
 void
-Controller::onInvitationInterest(const Name& prefix,
-                                 const Interest& interest,
+Controller::onInvitationInterest(const ndn::Name& prefix,
+                                 const ndn::Interest& interest,
                                  size_t routingPrefixOffset)
 {
   // _LOG_DEBUG("onInvitationInterest: " << interest.getName());
@@ -827,6 +887,12 @@
   m_validator.validate(*invitationInterest, onValidated, onValidationFailed);
 }
 
+void
+Controller::onRosterChanged(const chronos::ChatroomInfo& info)
+{
+  m_discoveryLogic.addLocalChatroom(info);
+}
+
 } // namespace chronos
 
 #if WAF
diff --git a/src/controller.hpp b/src/controller.hpp
index 6641b20..c489470 100644
--- a/src/controller.hpp
+++ b/src/controller.hpp
@@ -24,10 +24,12 @@
 #include "browse-contact-dialog.hpp"
 #include "add-contact-panel.hpp"
 #include "chat-dialog.hpp"
+#include "chatroom-discovery-dialog.hpp"
 
 #ifndef Q_MOC_RUN
 #include "common.hpp"
 #include "contact-manager.hpp"
+#include "chatroom-discovery-logic.hpp"
 #include "validator-invitation.hpp"
 #include <ndn-cxx/security/key-chain.hpp>
 #endif
@@ -101,6 +103,9 @@
   void
   addChatDialog(const QString& chatroomName, ChatDialog* chatDialog);
 
+  void
+  updateDiscoveryList(const chronos::ChatroomInfo& chatroomName, bool isAdd);
+
 signals:
   void
   closeDBModule();
@@ -115,7 +120,11 @@
   refreshBrowseContact();
 
   void
-  invitationInterest(const Name& prefix, const Interest& interest, size_t routingPrefixOffset);
+  invitationInterest(const ndn::Name& prefix, const ndn::Interest& interest,
+                     size_t routingPrefixOffset);
+
+  void
+  discoverChatroomChanged(const chronos::ChatroomInfo& chatroomInfo, bool isAdd);
 
 private slots:
   void
@@ -137,6 +146,9 @@
   onStartChatAction();
 
   void
+  onDiscoveryAction();
+
+  void
   onSettingsAction();
 
   void
@@ -164,7 +176,7 @@
   onStartChatroom(const QString& chatroom, bool secured);
 
   void
-  onInvitationResponded(const Name& invitationName, bool accepted);
+  onInvitationResponded(const ndn::Name& invitationName, bool accepted);
 
   void
   onShowChatMessage(const QString& chatroomName, const QString& from, const QString& data);
@@ -185,6 +197,9 @@
   onInvitationInterest(const ndn::Name& prefix, const ndn::Interest& interest,
                        size_t routingPrefixOffset);
 
+  void
+  onRosterChanged(const chronos::ChatroomInfo& info);
+
 private: // private member
   typedef std::map<std::string, QAction*> ChatActionList;
   typedef std::map<std::string, ChatDialog*> ChatDialogList;
@@ -197,8 +212,12 @@
   // Contact Manager
   ContactManager m_contactManager;
 
+  // Chatroom discovery
+  ChatroomDiscoveryLogic m_discoveryLogic;
+
   // Tray
   QAction*         m_startChatroom;
+  QAction*         m_discoveryAction;
   QAction*         m_minimizeAction;
   QAction*         m_settingsAction;
   QAction*         m_editProfileAction;
@@ -221,6 +240,7 @@
   BrowseContactDialog* m_browseContactDialog;
   AddContactPanel*     m_addContactPanel;
   ChatDialogList       m_chatDialogList;
+  ChatroomDiscoveryDialog* m_chatroomDiscoveryDialog;
 
   // Conf
   Name m_identity;
