src: rename namespace as chronochat
Change-Id: Idf390b1b2047c912735014d078ce099cf95026e6
diff --git a/src/add-contact-panel.cpp b/src/add-contact-panel.cpp
index 32bd79e..354758e 100644
--- a/src/add-contact-panel.cpp
+++ b/src/add-contact-panel.cpp
@@ -14,7 +14,7 @@
#ifndef Q_MOC_RUN
#endif
-namespace chronos {
+namespace chronochat {
AddContactPanel::AddContactPanel(QWidget *parent)
: QDialog(parent)
@@ -74,7 +74,7 @@
}
void
-AddContactPanel::onContactEndorseInfoReady(const Chronos::EndorseInfo& endorseInfo)
+AddContactPanel::onContactEndorseInfoReady(const chronochat::EndorseInfo& endorseInfo)
{
int entrySize = endorseInfo.endorsement_size();
@@ -94,7 +94,7 @@
}
}
-} // namespace chronos
+} // namespace chronochat
#if WAF
diff --git a/src/add-contact-panel.hpp b/src/add-contact-panel.hpp
index 545cd02..5dd3de2 100644
--- a/src/add-contact-panel.hpp
+++ b/src/add-contact-panel.hpp
@@ -8,8 +8,8 @@
* Author: Yingdi Yu <yingdi@cs.ucla.edu>
*/
-#ifndef CHRONOS_ADD_CONTACT_PANEL_HPP
-#define CHRONOS_ADD_CONTACT_PANEL_HPP
+#ifndef CHRONOCHAT_ADD_CONTACT_PANEL_HPP
+#define CHRONOCHAT_ADD_CONTACT_PANEL_HPP
#include <QDialog>
#include <QTableWidgetItem>
@@ -22,7 +22,7 @@
class AddContactPanel;
}
-namespace chronos {
+namespace chronochat {
class AddContactPanel : public QDialog
{
@@ -36,7 +36,7 @@
public slots:
void
- onContactEndorseInfoReady(const Chronos::EndorseInfo& endorseInfo);
+ onContactEndorseInfoReady(const chronochat::EndorseInfo& endorseInfo);
private slots:
void
@@ -64,6 +64,6 @@
QTableWidgetItem* m_endorseHeader;
};
-} // namespace chronos
+} // namespace chronochat
-#endif // CHRONOS_ADD_CONTACT_PANEL_HPP
+#endif // CHRONOCHAT_ADD_CONTACT_PANEL_HPP
diff --git a/src/browse-contact-dialog.cpp b/src/browse-contact-dialog.cpp
index 27a2881..481b418 100644
--- a/src/browse-contact-dialog.cpp
+++ b/src/browse-contact-dialog.cpp
@@ -17,7 +17,7 @@
#endif
-namespace chronos {
+namespace chronochat {
using ndn::IdentityCertificate;
@@ -131,7 +131,7 @@
}
}
-} // namespace chronos
+} // namespace chronochat
#if WAF
#include "browse-contact-dialog.moc"
diff --git a/src/browse-contact-dialog.hpp b/src/browse-contact-dialog.hpp
index c1250a8..a087538 100644
--- a/src/browse-contact-dialog.hpp
+++ b/src/browse-contact-dialog.hpp
@@ -8,8 +8,8 @@
* Author: Yingdi Yu <yingdi@cs.ucla.edu>
*/
-#ifndef CHRONOS_BROWSE_CONTACT_DIALOG_HPP
-#define CHRONOS_BROWSE_CONTACT_DIALOG_HPP
+#ifndef CHRONOCHAT_BROWSE_CONTACT_DIALOG_HPP
+#define CHRONOCHAT_BROWSE_CONTACT_DIALOG_HPP
#include <QDialog>
#include <QStringListModel>
@@ -26,7 +26,7 @@
class BrowseContactDialog;
}
-namespace chronos {
+namespace chronochat {
class BrowseContactDialog : public QDialog
{
@@ -89,6 +89,6 @@
QStringList m_contactCertNameList;
};
-} // namespace chronos
+} // namespace chronochat
-#endif // CHRONOS_BROWSE_CONTACT_DIALOG_HPP
+#endif // CHRONOCHAT_BROWSE_CONTACT_DIALOG_HPP
diff --git a/src/chat-dialog-backend.cpp b/src/chat-dialog-backend.cpp
index 3e77b53..2644006 100644
--- a/src/chat-dialog-backend.cpp
+++ b/src/chat-dialog-backend.cpp
@@ -18,7 +18,7 @@
INIT_LOGGER("ChatDialogBackend");
-namespace chronos {
+namespace chronochat {
static const time::milliseconds FRESHNESS_PERIOD(60000);
static const time::seconds HELLO_INTERVAL(60);
@@ -409,7 +409,7 @@
m_face->getIoService().stop();
}
-} // namespace chronos
+} // namespace chronochat
#if WAF
#include "chat-dialog-backend.moc"
diff --git a/src/chat-dialog-backend.hpp b/src/chat-dialog-backend.hpp
index f2d6f89..051a35e 100644
--- a/src/chat-dialog-backend.hpp
+++ b/src/chat-dialog-backend.hpp
@@ -20,7 +20,7 @@
#include <socket.hpp>
#endif
-namespace chronos {
+namespace chronochat {
class NodeInfo {
public:
@@ -99,7 +99,7 @@
signals:
void
- syncTreeUpdated(std::vector<chronos::NodeInfo> updates, QString digest);
+ syncTreeUpdated(std::vector<chronochat::NodeInfo> updates, QString digest);
void
chatMessageReceived(QString nick, QString text, time_t timestamp);
@@ -155,6 +155,6 @@
bool m_shouldResume;
};
-} // namespace chronos
+} // namespace chronochat
#endif // CHRONOCHAT_CHAT_DIALOG_BACKEND_HPP
diff --git a/src/chat-dialog.cpp b/src/chat-dialog.cpp
index a475c16..9c74715 100644
--- a/src/chat-dialog.cpp
+++ b/src/chat-dialog.cpp
@@ -19,9 +19,9 @@
Q_DECLARE_METATYPE(ndn::Name)
Q_DECLARE_METATYPE(time_t)
-Q_DECLARE_METATYPE(std::vector<chronos::NodeInfo>)
+Q_DECLARE_METATYPE(std::vector<chronochat::NodeInfo>)
-namespace chronos {
+namespace chronochat {
static const Name PRIVATE_PREFIX("/private/local");
static const uint8_t ROUTING_HINT_SEPARATOR[2] = {0xF0, 0x2E}; // %F0.
@@ -42,7 +42,7 @@
{
qRegisterMetaType<ndn::Name>("ndn::Name");
qRegisterMetaType<time_t>("time_t");
- qRegisterMetaType<std::vector<chronos::NodeInfo> >("std::vector<chronos::NodeInfo>");
+ qRegisterMetaType<std::vector<chronochat::NodeInfo> >("std::vector<chronochat::NodeInfo>");
m_scene = new DigestTreeScene(this);
m_trustScene = new TrustTreeScene(this);
@@ -76,8 +76,8 @@
m_rosterModel->setStringList(roster);
// When backend receives a sync update, notify frontend to update sync tree
- connect(&m_backend, SIGNAL(syncTreeUpdated(std::vector<chronos::NodeInfo>, QString)),
- this, SLOT(updateSyncTree(std::vector<chronos::NodeInfo>, QString)));
+ connect(&m_backend, SIGNAL(syncTreeUpdated(std::vector<chronochat::NodeInfo>, QString)),
+ this, SLOT(updateSyncTree(std::vector<chronochat::NodeInfo>, QString)));
// When backend receives a new chat message, notify frontent to print it out.
connect(&m_backend, SIGNAL(chatMessageReceived(QString, QString, time_t)),
@@ -335,7 +335,7 @@
// private slots:
void
-ChatDialog::updateSyncTree(std::vector<chronos::NodeInfo> updates, QString rootDigest)
+ChatDialog::updateSyncTree(std::vector<chronochat::NodeInfo> updates, QString rootDigest)
{
m_scene->processSyncUpdate(updates, rootDigest);
}
@@ -462,7 +462,7 @@
fitView();
}
-} // namespace chronos
+} // namespace chronochat
#if WAF
diff --git a/src/chat-dialog.hpp b/src/chat-dialog.hpp
index 7f1a726..3568750 100644
--- a/src/chat-dialog.hpp
+++ b/src/chat-dialog.hpp
@@ -34,7 +34,7 @@
class ChatDialog;
}
-namespace chronos {
+namespace chronochat {
class ChatDialog : public QDialog
{
@@ -117,7 +117,7 @@
resetIcon();
void
- rosterChanged(const chronos::ChatroomInfo& info);
+ rosterChanged(const chronochat::ChatroomInfo& info);
public slots:
void
@@ -128,7 +128,7 @@
private slots:
void
- updateSyncTree(std::vector<chronos::NodeInfo> updates, QString rootDigest);
+ updateSyncTree(std::vector<chronochat::NodeInfo> updates, QString rootDigest);
void
receiveChatMessage(QString nick, QString text, time_t timestamp);
@@ -175,6 +175,6 @@
QStringListModel* m_rosterModel;
};
-} // namespace chronos
+} // namespace chronochat
#endif // CHRONOCHAT_CHAT_DIALOG_HPP
diff --git a/src/chatroom-discovery-dialog.cpp b/src/chatroom-discovery-dialog.cpp
index 738eb84..7e431ee 100644
--- a/src/chatroom-discovery-dialog.cpp
+++ b/src/chatroom-discovery-dialog.cpp
@@ -1,7 +1,7 @@
#include "chatroom-discovery-dialog.hpp"
#include "ui_chatroom-discovery-dialog.h"
-namespace chronos {
+namespace chronochat {
using ndn::Name;
@@ -77,7 +77,7 @@
}
void
-ChatroomDiscoveryDialog::onDiscoverChatroomChanged(const chronos::ChatroomInfo& info, bool isAdd)
+ChatroomDiscoveryDialog::onDiscoverChatroomChanged(const chronochat::ChatroomInfo& info, bool isAdd)
{
if (isAdd)
m_chatrooms[info.getName()] = info;
@@ -178,7 +178,7 @@
}
}
-} // namespace chronos
+} // namespace chronochat
#if WAF
diff --git a/src/chatroom-discovery-dialog.hpp b/src/chatroom-discovery-dialog.hpp
index 0193cbd..916a6d2 100644
--- a/src/chatroom-discovery-dialog.hpp
+++ b/src/chatroom-discovery-dialog.hpp
@@ -27,7 +27,7 @@
class ChatroomDiscoveryDialog;
}
-namespace chronos {
+namespace chronochat {
class ChatroomDiscoveryDialog : public QDialog
{
@@ -48,7 +48,7 @@
public slots:
void
- onDiscoverChatroomChanged(const chronos::ChatroomInfo& chatroom, bool isAdd);
+ onDiscoverChatroomChanged(const chronochat::ChatroomInfo& chatroom, bool isAdd);
private slots:
void
@@ -82,6 +82,6 @@
ChatroomDiscoveryViewDialog* m_chatroomDiscoveryViewDialog;
};
-} //namespace chronos
+} //namespace chronochat
#endif // CHRONOCHAT_CHATROOM_DISCOVERY_DIALOG_HPP
diff --git a/src/chatroom-discovery-logic.cpp b/src/chatroom-discovery-logic.cpp
index 8d8590b..d101706 100644
--- a/src/chatroom-discovery-logic.cpp
+++ b/src/chatroom-discovery-logic.cpp
@@ -12,7 +12,7 @@
#include "chatroom-discovery-logic.hpp"
-namespace chronos {
+namespace chronochat {
const size_t ChatroomDiscoveryLogic::OFFSET_CHATROOM_NAME = 4;
const size_t ChatroomDiscoveryLogic::DISCOVERY_INTEREST_NAME_SIZE = 4;
@@ -219,4 +219,4 @@
}
-} // namespace chronos
+} // namespace chronochat
diff --git a/src/chatroom-discovery-logic.hpp b/src/chatroom-discovery-logic.hpp
index b5fea14..58b44f9 100644
--- a/src/chatroom-discovery-logic.hpp
+++ b/src/chatroom-discovery-logic.hpp
@@ -15,14 +15,14 @@
#include "chatroom-info.hpp"
#include <ndn-cxx/util/scheduler.hpp>
-namespace chronos {
+namespace chronochat {
class ChatroomDiscoveryLogic : noncopyable
{
public:
typedef function<void(const ChatroomInfo& chatroomName, bool isAdd)> UpdateCallback;
- typedef std::map<Name::Component, chronos::ChatroomInfo> Chatrooms;
+ typedef std::map<Name::Component, chronochat::ChatroomInfo> Chatrooms;
static const size_t OFFSET_CHATROOM_NAME;
static const size_t DISCOVERY_INTEREST_NAME_SIZE;
static const size_t REFRESHING_INTEREST_NAME_SIZE;
@@ -113,6 +113,6 @@
return m_chatrooms;
}
-} // namespace chronos
+} // namespace chronochat
#endif // CHRONOCHAT_CHATROOM_DISCOVERY_LOGIC_HPP
diff --git a/src/chatroom-discovery-view-dialog.cpp b/src/chatroom-discovery-view-dialog.cpp
index ac6c775..b0593c9 100644
--- a/src/chatroom-discovery-view-dialog.cpp
+++ b/src/chatroom-discovery-view-dialog.cpp
@@ -11,7 +11,7 @@
#include "chatroom-discovery-view-dialog.hpp"
#include "ui_chatroom-discovery-view-dialog.h"
-namespace chronos {
+namespace chronochat {
using ndn::Name;
@@ -62,7 +62,7 @@
ui->participantsBrowser->setPlainText(content);
}
-} // namespace chronos
+} // namespace chronochat
#if WAF
#include "chatroom-discovery-view-dialog.moc"
diff --git a/src/chatroom-discovery-view-dialog.hpp b/src/chatroom-discovery-view-dialog.hpp
index bb29b7a..3ad0639 100644
--- a/src/chatroom-discovery-view-dialog.hpp
+++ b/src/chatroom-discovery-view-dialog.hpp
@@ -22,7 +22,7 @@
class ChatroomDiscoveryViewDialog;
}
-namespace chronos {
+namespace chronochat {
class ChatroomDiscoveryViewDialog : public QDialog
{
@@ -50,6 +50,6 @@
Ui::ChatroomDiscoveryViewDialog* ui;
};
-} //namespace chronos
+} //namespace chronochat
#endif // CHRONOCHAT_CHATROOM_DISCOVERY_VIEW_DIALOG_HPP
diff --git a/src/chatroom-info.cpp b/src/chatroom-info.cpp
index 9dc3439..a56856c 100644
--- a/src/chatroom-info.cpp
+++ b/src/chatroom-info.cpp
@@ -10,7 +10,7 @@
*/
#include "chatroom-info.hpp"
-namespace chronos {
+namespace chronochat {
ChatroomInfo::ChatroomInfo()
{
@@ -233,4 +233,4 @@
m_manager = manager;
}
-} // namespace chronos
+} // namespace chronochat
diff --git a/src/chatroom-info.hpp b/src/chatroom-info.hpp
index fc7c707..80b076b 100644
--- a/src/chatroom-info.hpp
+++ b/src/chatroom-info.hpp
@@ -24,7 +24,7 @@
#include <boost/concept_check.hpp>
#include <list>
-namespace chronos {
+namespace chronochat {
/** \brief store a chatroom's information with encode and decode method.
\sa docs/design.rst
@@ -147,6 +147,6 @@
BOOST_CONCEPT_ASSERT((ndn::WireDecodable<ChatroomInfo>));
-} // namespace chronos
+} // namespace chronochat
-#endif //CHRONOCHAT_CHATROOM_INFO_HPP
+#endif // CHRONOCHAT_CHATROOM_INFO_HPP
diff --git a/src/chatroom-tlv.hpp b/src/chatroom-tlv.hpp
index c69c639..be02217 100644
--- a/src/chatroom-tlv.hpp
+++ b/src/chatroom-tlv.hpp
@@ -1,7 +1,7 @@
#ifndef CHRONOCHAT_CHATROOM_TLV_HPP
#define CHRONOCHAT_CHATROOM_TLV_HPP
-namespace chronos {
+namespace chronochat {
namespace tlv {
@@ -16,6 +16,6 @@
} // namespace tlv
-} // namespace chronos
+} // namespace chronochat
#endif // CHRONOCHAT_CHATROOM_TLV_HPP
diff --git a/src/common.hpp b/src/common.hpp
index 9acb3b7..c8461df 100644
--- a/src/common.hpp
+++ b/src/common.hpp
@@ -3,8 +3,8 @@
* COPYRIGHT MSG GOES HERE...
*/
-#ifndef CHRONOS_COMMON_HPP
-#define CHRONOS_COMMON_HPP
+#ifndef CHRONOCHAT_COMMON_HPP
+#define CHRONOCHAT_COMMON_HPP
#include "config.h"
@@ -39,7 +39,7 @@
#include <boost/noncopyable.hpp>
#include <boost/property_tree/ptree.hpp>
-namespace chronos {
+namespace chronochat {
using std::size_t;
@@ -73,6 +73,6 @@
namespace name = ndn::name;
namespace time = ndn::time;
-} // namespace chronos
+} // namespace chronochat
-#endif // CHRONOS_COMMON_HPP
+#endif // CHRONOCHAT_COMMON_HPP
diff --git a/src/contact-manager.cpp b/src/contact-manager.cpp
index 89f4ea3..e377d4a 100644
--- a/src/contact-manager.cpp
+++ b/src/contact-manager.cpp
@@ -30,9 +30,9 @@
namespace fs = boost::filesystem;
-// INIT_LOGGER("chronos.ContactManager");
+// INIT_LOGGER("chronochat.ContactManager");
-namespace chronos{
+namespace chronochat {
using std::string;
using std::map;
@@ -184,7 +184,7 @@
// _LOG_DEBUG("prepareEndorseInfo");
const Profile& profile = m_bufferedContacts[identity].m_selfEndorseCert->getProfile();
- shared_ptr<Chronos::EndorseInfo> endorseInfo = make_shared<Chronos::EndorseInfo>();
+ shared_ptr<chronochat::EndorseInfo> endorseInfo = make_shared<chronochat::EndorseInfo>();
m_bufferedContacts[identity].m_endorseInfo = endorseInfo;
map<string, int> endorseCount;
@@ -222,7 +222,7 @@
}
for (Profile::const_iterator pIt = profile.begin(); pIt != profile.end(); pIt++) {
- Chronos::EndorseInfo::Endorsement* endorsement = endorseInfo->add_endorsement();
+ chronochat::EndorseInfo::Endorsement* endorsement = endorseInfo->add_endorsement();
endorsement->set_type(pIt->first);
endorsement->set_value(pIt->second);
std::stringstream ss;
@@ -914,7 +914,7 @@
publishEndorseCertificateInDNS(*newEndorseCertificate);
}
-} // namespace chronos
+} // namespace chronochat
#if WAF
diff --git a/src/contact-manager.hpp b/src/contact-manager.hpp
index 6c43bac..635f5a1 100644
--- a/src/contact-manager.hpp
+++ b/src/contact-manager.hpp
@@ -8,8 +8,8 @@
* Author: Yingdi Yu <yingdi@cs.ucla.edu>
*/
-#ifndef CHRONOS_CONTACT_MANAGER_HPP
-#define CHRONOS_CONTACT_MANAGER_HPP
+#ifndef CHRONOCHAT_CONTACT_MANAGER_HPP
+#define CHRONOCHAT_CONTACT_MANAGER_HPP
#include <QObject>
@@ -26,7 +26,7 @@
#include <boost/thread/recursive_mutex.hpp>
#endif
-namespace chronos{
+namespace chronochat {
typedef function<void(const Interest&)> TimeoutNotify;
typedef std::vector<shared_ptr<Contact> > ContactList;
@@ -181,7 +181,7 @@
signals:
void
- contactEndorseInfoReady(const Chronos::EndorseInfo& endorseInfo);
+ contactEndorseInfoReady(const chronochat::EndorseInfo& endorseInfo);
void
contactInfoFetchFailed(const QString& identity);
@@ -257,7 +257,7 @@
shared_ptr<EndorseCertificate> m_selfEndorseCert;
shared_ptr<EndorseCollection> m_endorseCollection;
std::vector<shared_ptr<EndorseCertificate> > m_endorseCertList;
- shared_ptr<Chronos::EndorseInfo> m_endorseInfo;
+ shared_ptr<chronochat::EndorseInfo> m_endorseInfo;
};
typedef std::map<Name, FetchedInfo> BufferedContacts;
@@ -288,6 +288,6 @@
int m_idCertCount;
};
-} // namespace chronos
+} // namespace chronochat
-#endif //CHRONOS_CONTACT_MANAGER_HPP
+#endif // CHRONOCHAT_CONTACT_MANAGER_HPP
diff --git a/src/contact-panel.cpp b/src/contact-panel.cpp
index bebd2fb..8841d5d 100644
--- a/src/contact-panel.cpp
+++ b/src/contact-panel.cpp
@@ -24,7 +24,7 @@
// INIT_LOGGER("ContactPanel");
-namespace chronos {
+namespace chronochat {
ContactPanel::ContactPanel(QWidget *parent)
: QDialog(parent)
@@ -337,7 +337,7 @@
emit updateAlias(identity, alias);
}
-} // namespace chronos
+} // namespace chronochat
#if WAF
#include "contact-panel.moc"
diff --git a/src/contact-panel.hpp b/src/contact-panel.hpp
index a7a3241..d164391 100644
--- a/src/contact-panel.hpp
+++ b/src/contact-panel.hpp
@@ -8,8 +8,8 @@
* Author: Yingdi Yu <yingdi@cs.ucla.edu>
*/
-#ifndef CHRONOS_CONTACT_PANEL_HPP
-#define CHRONOS_CONTACT_PANEL_HPP
+#ifndef CHRONOCHAT_CONTACT_PANEL_HPP
+#define CHRONOCHAT_CONTACT_PANEL_HPP
#include <QDialog>
#include <QStringListModel>
@@ -25,7 +25,7 @@
class ContactPanel;
}
-namespace chronos {
+namespace chronochat {
class ContactPanel : public QDialog
{
@@ -139,6 +139,6 @@
QString m_currentSelectedContact;
};
-} // namespace chronos
+} // namespace chronochat
-#endif // CHRONOS_CONTACT_PANEL_HPP
+#endif // CHRONOCHAT_CONTACT_PANEL_HPP
diff --git a/src/contact-storage.cpp b/src/contact-storage.cpp
index 20c6983..bc91ac6 100644
--- a/src/contact-storage.cpp
+++ b/src/contact-storage.cpp
@@ -17,7 +17,7 @@
// INIT_LOGGER ("chronos.ContactStorage");
-namespace chronos {
+namespace chronochat {
namespace fs = boost::filesystem;
@@ -171,7 +171,7 @@
int res = sqlite3_open((chronosDir / getDBName()).c_str(), &m_db);
if (res != SQLITE_OK)
- throw Error("Chronos DB cannot be open/created");
+ throw Error("chronochat DB cannot be open/created");
initializeTable("SelfProfile", INIT_SP_TABLE);
initializeTable("SelfEndorse", INIT_SE_TABLE);
@@ -601,4 +601,4 @@
return data;
}
-} // namespace chronos
+} // namespace chronochat
diff --git a/src/contact-storage.hpp b/src/contact-storage.hpp
index da13d4b..833c7d6 100644
--- a/src/contact-storage.hpp
+++ b/src/contact-storage.hpp
@@ -8,14 +8,14 @@
* Author: Yingdi Yu <yingdi@cs.ucla.edu>
*/
-#ifndef CHRONOS_CONTACT_STORAGE_HPP
-#define CHRONOS_CONTACT_STORAGE_HPP
+#ifndef CHRONOCHAT_CONTACT_STORAGE_HPP
+#define CHRONOCHAT_CONTACT_STORAGE_HPP
#include "contact.hpp"
#include "endorse-collection.pb.h"
#include <sqlite3.h>
-namespace chronos{
+namespace chronochat {
class ContactStorage
{
@@ -119,6 +119,6 @@
sqlite3 *m_db;
};
-}//chronos
+} // namespace chronochat
-#endif // CHRONOS_CONTACT_STORAGE_HPP
+#endif // CHRONOCHAT_CONTACT_STORAGE_HPP
diff --git a/src/contact.hpp b/src/contact.hpp
index 8052ac7..8583d16 100644
--- a/src/contact.hpp
+++ b/src/contact.hpp
@@ -8,15 +8,15 @@
* Author: Yingdi Yu <yingdi@cs.ucla.edu>
*/
-#ifndef CHRONOS_CONTACT_HPP
-#define CHRONOS_CONTACT_HPP
+#ifndef CHRONOCHAT_CONTACT_HPP
+#define CHRONOCHAT_CONTACT_HPP
#include "common.hpp"
#include <ndn-cxx/security/identity-certificate.hpp>
#include <ndn-cxx/util/regex.hpp>
#include "endorse-certificate.hpp"
-namespace chronos {
+namespace chronochat {
class Contact
{
@@ -234,6 +234,6 @@
TrustScopes m_trustScope;
};
-} // namespace chronos
+} // namespace chronochat
-#endif // CHRONOS_CONTACT_HPP
+#endif // CHRONOCHAT_CONTACT_HPP
diff --git a/src/controller-backend.cpp b/src/controller-backend.cpp
index 7d9f4ef..804716b 100644
--- a/src/controller-backend.cpp
+++ b/src/controller-backend.cpp
@@ -18,7 +18,7 @@
INIT_LOGGER("ControllerBackend");
-namespace chronos {
+namespace chronochat {
using std::string;
@@ -352,7 +352,7 @@
}
-} // namespace chronos
+} // namespace chronochat
#if WAF
#include "controller-backend.moc"
diff --git a/src/controller-backend.hpp b/src/controller-backend.hpp
index 2456641..be6c499 100644
--- a/src/controller-backend.hpp
+++ b/src/controller-backend.hpp
@@ -22,7 +22,7 @@
#include <ndn-cxx/security/key-chain.hpp>
#endif
-namespace chronos {
+namespace chronochat {
class ControllerBackend : public QThread
{
@@ -90,7 +90,7 @@
invitaionValidated(QString alias, QString chatroom, ndn::Name invitationINterest);
void
- startChatroomOnInvitation(chronos::Invitation invitation, bool secured);
+ startChatroomOnInvitation(chronochat::Invitation invitation, bool secured);
public slots:
void
@@ -138,6 +138,6 @@
QMutex m_mutex;
};
-} // namespace chronos
+} // namespace chronochat
#endif // CHRONOCHAT_CONTROLLER_BACKEND_HPP
diff --git a/src/controller.cpp b/src/controller.cpp
index 12e31b8..1b585c1 100644
--- a/src/controller.cpp
+++ b/src/controller.cpp
@@ -25,17 +25,17 @@
#include "logging.h"
#endif
-INIT_LOGGER("chronos.Controller");
+INIT_LOGGER("chronochat.Controller");
Q_DECLARE_METATYPE(ndn::Name)
Q_DECLARE_METATYPE(ndn::IdentityCertificate)
-Q_DECLARE_METATYPE(Chronos::EndorseInfo)
+Q_DECLARE_METATYPE(chronochat::EndorseInfo)
Q_DECLARE_METATYPE(ndn::Interest)
Q_DECLARE_METATYPE(size_t)
-Q_DECLARE_METATYPE(chronos::ChatroomInfo)
-Q_DECLARE_METATYPE(chronos::Invitation)
+Q_DECLARE_METATYPE(chronochat::ChatroomInfo)
+Q_DECLARE_METATYPE(chronochat::Invitation)
-namespace chronos {
+namespace chronochat {
using std::string;
@@ -53,11 +53,11 @@
{
qRegisterMetaType<ndn::Name>("ndn.Name");
qRegisterMetaType<ndn::IdentityCertificate>("ndn.IdentityCertificate");
- qRegisterMetaType<Chronos::EndorseInfo>("Chronos.EndorseInfo");
+ qRegisterMetaType<chronochat::EndorseInfo>("chronochat.EndorseInfo");
qRegisterMetaType<ndn::Interest>("ndn.Interest");
qRegisterMetaType<size_t>("size_t");
- qRegisterMetaType<chronos::ChatroomInfo>("chronos.Chatroom");
- qRegisterMetaType<chronos::Invitation>("chronos.Invitation");
+ qRegisterMetaType<chronochat::ChatroomInfo>("chronos.Chatroom");
+ qRegisterMetaType<chronochat::Invitation>("chronos.Invitation");
// Connection to ContactManager
connect(m_backend.getContactManager(), SIGNAL(warning(const QString&)),
@@ -99,9 +99,9 @@
connect(m_addContactPanel, SIGNAL(addContact(const QString&)),
m_backend.getContactManager(), SLOT(onAddFetchedContact(const QString&)));
connect(m_backend.getContactManager(),
- SIGNAL(contactEndorseInfoReady(const Chronos::EndorseInfo&)),
+ SIGNAL(contactEndorseInfoReady(const chronochat::EndorseInfo&)),
m_addContactPanel,
- SLOT(onContactEndorseInfoReady(const Chronos::EndorseInfo&)));
+ SLOT(onContactEndorseInfoReady(const chronochat::EndorseInfo&)));
// Connection to BrowseContactDialog
@@ -170,8 +170,8 @@
m_invitationDialog, SLOT(onInvitationReceived(QString, QString, ndn::Name)));
// on invitation accepted:
- connect(&m_backend, SIGNAL(startChatroomOnInvitation(chronos::Invitation, bool)),
- this, SLOT(onStartChatroom2(chronos::Invitation, bool)));
+ connect(&m_backend, SIGNAL(startChatroomOnInvitation(chronochat::Invitation, bool)),
+ this, SLOT(onStartChatroom2(chronochat::Invitation, bool)));
m_backend.start();
@@ -428,8 +428,8 @@
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(chatDialog, SIGNAL(rosterChanged(const chronochat::ChatroomInfo&)),
+ this, SLOT(onRosterChanged(const chronochat::ChatroomInfo&)));
connect(&m_backend, SIGNAL(localPrefixUpdated(const QString&)),
chatDialog->getBackend(), SLOT(updateRoutingPrefix(const QString&)));
connect(this, SIGNAL(localPrefixConfigured(const QString&)),
@@ -639,7 +639,7 @@
}
void
-Controller::onStartChatroom2(chronos::Invitation invitation, bool secured)
+Controller::onStartChatroom2(chronochat::Invitation invitation, bool secured)
{
QString chatroomName = QString::fromStdString(invitation.getChatroom());
onStartChatroom(chatroomName, secured);
@@ -705,12 +705,12 @@
}
void
-Controller::onRosterChanged(const chronos::ChatroomInfo& info)
+Controller::onRosterChanged(const chronochat::ChatroomInfo& info)
{
}
-} // namespace chronos
+} // namespace chronochat
#if WAF
#include "controller.moc"
diff --git a/src/controller.hpp b/src/controller.hpp
index 44e4801..1c6ef43 100644
--- a/src/controller.hpp
+++ b/src/controller.hpp
@@ -8,8 +8,8 @@
* Author: Yingdi Yu <yingdi@cs.ucla.edu>
*/
-#ifndef CHRONOS_CONTROLLER_HPP
-#define CHRONOS_CONTROLLER_HPP
+#ifndef CHRONOCHAT_CONTROLLER_HPP
+#define CHRONOCHAT_CONTROLLER_HPP
#include <QDialog>
#include <QMenu>
@@ -31,7 +31,7 @@
#include "controller-backend.hpp"
#endif
-namespace chronos {
+namespace chronochat {
class Controller : public QDialog
{
@@ -75,7 +75,7 @@
addChatDialog(const QString& chatroomName, ChatDialog* chatDialog);
void
- updateDiscoveryList(const chronos::ChatroomInfo& chatroomName, bool isAdd);
+ updateDiscoveryList(const chronochat::ChatroomInfo& chatroomName, bool isAdd);
signals:
void
@@ -104,7 +104,7 @@
size_t routingPrefixOffset);
void
- discoverChatroomChanged(const chronos::ChatroomInfo& chatroomInfo, bool isAdd);
+ discoverChatroomChanged(const chronochat::ChatroomInfo& chatroomInfo, bool isAdd);
void
addChatroom(QString chatroomName);
@@ -159,7 +159,7 @@
onStartChatroom(const QString& chatroom, bool secured);
void
- onStartChatroom2(chronos::Invitation invitation, bool secured);
+ onStartChatroom2(chronochat::Invitation invitation, bool secured);
void
onShowChatMessage(const QString& chatroomName, const QString& from, const QString& data);
@@ -177,7 +177,7 @@
onError(const QString& msg);
void
- onRosterChanged(const chronos::ChatroomInfo& info);
+ onRosterChanged(const chronochat::ChatroomInfo& info);
private: // private member
typedef std::map<std::string, QAction*> ChatActionList;
@@ -222,6 +222,6 @@
ControllerBackend m_backend;
};
-} // namespace chronos
+} // namespace chronochat
-#endif //CHRONOS_CONTROLLER_HPP
+#endif // CHRONOCHAT_CONTROLLER_HPP
diff --git a/src/cryptopp.hpp b/src/cryptopp.hpp
index f49ebb2..01fbfc2 100644
--- a/src/cryptopp.hpp
+++ b/src/cryptopp.hpp
@@ -7,8 +7,8 @@
* Author: Yingdi Yu <yingdi@cs.ucla.edu>
*/
-#ifndef CHRONOS_CRYPTOPP_HPP
-#define CHRONOS_CRYPTOPP_HPP
+#ifndef CHRONOCHAT_CRYPTOPP_HPP
+#define CHRONOCHAT_CRYPTOPP_HPP
// suppress CryptoPP warnings
#pragma GCC system_header
@@ -20,4 +20,4 @@
#include <cryptopp/sha.h>
#include <cryptopp/filters.h>
-#endif // CHRONOS_CRYPTOPP_HPP
+#endif // CHRONOCHAT_CRYPTOPP_HPP
diff --git a/src/digest-tree-scene.cpp b/src/digest-tree-scene.cpp
index b09d241..a68c63f 100644
--- a/src/digest-tree-scene.cpp
+++ b/src/digest-tree-scene.cpp
@@ -21,7 +21,7 @@
#include <memory>
#endif
-namespace chronos {
+namespace chronochat {
static const double Pi = 3.14159265358979323846264338327950288419717;
static const int NODE_SIZE = 40;
@@ -35,7 +35,7 @@
}
void
-DigestTreeScene::processSyncUpdate(const std::vector<chronos::NodeInfo>& nodeInfos,
+DigestTreeScene::processSyncUpdate(const std::vector<chronochat::NodeInfo>& nodeInfos,
const QString& digest)
{
m_rootDigest = digest;
@@ -284,7 +284,7 @@
innerBR.y() + (innerBR.height() - textBR.height())/2);
}
-} // namespace chronos
+} // namespace chronochat
#if WAF
#include "digest-tree-scene.moc"
diff --git a/src/digest-tree-scene.hpp b/src/digest-tree-scene.hpp
index 4cf4d7f..3720d4b 100644
--- a/src/digest-tree-scene.hpp
+++ b/src/digest-tree-scene.hpp
@@ -9,8 +9,8 @@
* Alexander Afanasyev <alexander.afanasyev@ucla.edu>
*/
-#ifndef CHRONOS_DIGEST_TREE_SCENE_HPP
-#define CHRONOS_DIGEST_TREE_SCENE_HPP
+#ifndef CHRONOCHAT_DIGEST_TREE_SCENE_HPP
+#define CHRONOCHAT_DIGEST_TREE_SCENE_HPP
#include <QtGui/QGraphicsScene>
#include <QColor>
@@ -27,7 +27,7 @@
class QGraphicsTextItem;
-namespace chronos {
+namespace chronochat {
class User;
class DisplayUser;
@@ -47,7 +47,7 @@
DigestTreeScene(QWidget *parent = 0);
void
- processSyncUpdate(const std::vector<chronos::NodeInfo>& nodeInfos,
+ processSyncUpdate(const std::vector<chronochat::NodeInfo>& nodeInfos,
const QString& digest);
void
@@ -73,10 +73,10 @@
private:
void
- plotEdge(const std::vector<chronos::TreeLayout::Coordinate>& v, int nodeSize);
+ plotEdge(const std::vector<chronochat::TreeLayout::Coordinate>& v, int nodeSize);
void
- plotNode(const std::vector<chronos::TreeLayout::Coordinate>& v, QString digest, int nodeSize);
+ plotNode(const std::vector<chronochat::TreeLayout::Coordinate>& v, QString digest, int nodeSize);
void
reDrawNode(DisplayUserPtr p, QColor rimColor);
@@ -230,6 +230,6 @@
QGraphicsRectItem* m_nickRectItem;
};
-} // namespace chronos
+} // namespace chronochat
-#endif // CHRONOS_DIGEST_TREE_SCENE_HPP
+#endif // CHRONOCHAT_DIGEST_TREE_SCENE_HPP
diff --git a/src/endorse-certificate.cpp b/src/endorse-certificate.cpp
index 8fc8dec..b72d57e 100644
--- a/src/endorse-certificate.cpp
+++ b/src/endorse-certificate.cpp
@@ -13,7 +13,7 @@
#include <boost/iostreams/stream.hpp>
#include <ndn-cxx/encoding/buffer-stream.hpp>
-namespace chronos {
+namespace chronochat {
using std::vector;
using std::string;
@@ -30,8 +30,8 @@
const vector<string> EndorseCertificate::DEFAULT_ENDORSE_LIST;
-Chronos::EndorseExtensionMsg&
-operator<<(Chronos::EndorseExtensionMsg& endorseExtension, const vector<string>& endorseList)
+chronochat::EndorseExtensionMsg&
+operator<<(chronochat::EndorseExtensionMsg& endorseExtension, const vector<string>& endorseList)
{
for (vector<string>::const_iterator it = endorseList.begin(); it != endorseList.end(); it++)
endorseExtension.add_endorseentry()->set_name(*it);
@@ -39,8 +39,8 @@
return endorseExtension;
}
-Chronos::EndorseExtensionMsg&
-operator>>(Chronos::EndorseExtensionMsg& endorseExtension, vector<string>& endorseList)
+chronochat::EndorseExtensionMsg&
+operator>>(chronochat::EndorseExtensionMsg& endorseExtension, vector<string>& endorseList)
{
for (int i = 0; i < endorseExtension.endorseentry_size(); i ++)
endorseList.push_back(endorseExtension.endorseentry(i).name());
@@ -72,7 +72,7 @@
addExtension(CertificateExtension(PROFILE_EXT_OID, true, *profileStream.buf()));
OBufferStream endorseStream;
- Chronos::EndorseExtensionMsg endorseExtension;
+ chronochat::EndorseExtensionMsg endorseExtension;
endorseExtension << m_endorseList;
endorseExtension.SerializeToOstream(&endorseStream);
addExtension(CertificateExtension(ENDORSE_EXT_OID, true, *endorseStream.buf()));
@@ -103,7 +103,7 @@
addExtension(CertificateExtension(PROFILE_EXT_OID, true, *profileStream.buf()));
OBufferStream endorseStream;
- Chronos::EndorseExtensionMsg endorseExtension;
+ chronochat::EndorseExtensionMsg endorseExtension;
endorseExtension << m_endorseList;
endorseExtension.SerializeToOstream(&endorseStream);
addExtension(CertificateExtension(ENDORSE_EXT_OID, true, *endorseStream.buf()));
@@ -138,7 +138,7 @@
addExtension(CertificateExtension(PROFILE_EXT_OID, true, *profileStream.buf()));
OBufferStream endorseStream;
- Chronos::EndorseExtensionMsg endorseExtension;
+ chronochat::EndorseExtensionMsg endorseExtension;
endorseExtension << m_endorseList;
endorseExtension.SerializeToOstream(&endorseStream);
addExtension(CertificateExtension(ENDORSE_EXT_OID, true, *endorseStream.buf()));
@@ -174,7 +174,7 @@
m_profile.decode(is);
}
if (ENDORSE_EXT_OID == it->getOid()) {
- Chronos::EndorseExtensionMsg endorseExtension;
+ chronochat::EndorseExtensionMsg endorseExtension;
boost::iostreams::stream<boost::iostreams::array_source> is
(reinterpret_cast<const char*>(it->getValue().buf()), it->getValue().size());
@@ -185,4 +185,4 @@
}
}
-} // namespace chronos
+} // namespace chronochat
diff --git a/src/endorse-certificate.hpp b/src/endorse-certificate.hpp
index 6a73edf..d215a22 100644
--- a/src/endorse-certificate.hpp
+++ b/src/endorse-certificate.hpp
@@ -8,12 +8,12 @@
* Author: Yingdi Yu <yingdi@cs.ucla.edu>
*/
-#ifndef CHRONOS_ENDORSE_CERTIFICATE_HPP
-#define CHRONOS_ENDORSE_CERTIFICATE_HPP
+#ifndef CHRONOCHAT_ENDORSE_CERTIFICATE_HPP
+#define CHRONOCHAT_ENDORSE_CERTIFICATE_HPP
#include "profile.hpp"
-namespace chronos {
+namespace chronochat {
class EndorseCertificate : public ndn::Certificate
{
@@ -91,6 +91,6 @@
};
-} // namespace chronos
+} // namespace chronochat
-#endif // CHRONOS_ENDORSE_CERTIFICATE_HPP
+#endif // CHRONOCHAT_ENDORSE_CERTIFICATE_HPP
diff --git a/src/endorse-collection.proto b/src/endorse-collection.proto
index 7aa1af8..f989516 100644
--- a/src/endorse-collection.proto
+++ b/src/endorse-collection.proto
@@ -1,4 +1,4 @@
-package chronos;
+package chronochat;
message EndorseCollection
{
diff --git a/src/endorse-combobox-delegate.cpp b/src/endorse-combobox-delegate.cpp
index be46ccd..1888baf 100644
--- a/src/endorse-combobox-delegate.cpp
+++ b/src/endorse-combobox-delegate.cpp
@@ -17,7 +17,7 @@
#include "logging.h"
#endif
-namespace chronos {
+namespace chronochat {
EndorseComboBoxDelegate::EndorseComboBoxDelegate(QObject* parent)
: QItemDelegate(parent)
@@ -76,7 +76,7 @@
QApplication::style()->drawControl(QStyle::CE_ItemViewItem, &myOption, painter);
}
-} // namespace chronos
+} // namespace chronochat
#if WAF
#include "endorse-combobox-delegate.moc"
diff --git a/src/endorse-combobox-delegate.hpp b/src/endorse-combobox-delegate.hpp
index 92e26d1..0611461 100644
--- a/src/endorse-combobox-delegate.hpp
+++ b/src/endorse-combobox-delegate.hpp
@@ -8,14 +8,14 @@
* Author: Yingdi Yu <yingdi@cs.ucla.edu>
*/
-#ifndef CHRONOS_ENDORSE_COMBOBOX_DELEGATE_HPP
-#define CHRONOS_ENDORSE_COMBOBOX_DELEGATE_HPP
+#ifndef CHRONOCHAT_ENDORSE_COMBOBOX_DELEGATE_HPP
+#define CHRONOCHAT_ENDORSE_COMBOBOX_DELEGATE_HPP
#include <QItemDelegate>
#include <string>
#include <vector>
-namespace chronos {
+namespace chronochat {
class EndorseComboBoxDelegate : public QItemDelegate
{
@@ -48,6 +48,6 @@
};
-} // namespace chronos
+} // namespace chronochat
-#endif // CHRONOS_ENDORSE_COMBOBOX_DELEGATE_HPP
+#endif // CHRONOCHAT_ENDORSE_COMBOBOX_DELEGATE_HPP
diff --git a/src/endorse-extension.proto b/src/endorse-extension.proto
index 5db625c..2cee133 100644
--- a/src/endorse-extension.proto
+++ b/src/endorse-extension.proto
@@ -1,10 +1,10 @@
-package Chronos;
+package chronochat;
message EndorseExtensionMsg
{
message EndorseEntry
{
required string name = 1;
- }
+ }
repeated EndorseEntry endorseEntry = 1;
}
\ No newline at end of file
diff --git a/src/endorse-info.proto b/src/endorse-info.proto
index 41aa6f2..b1657d6 100644
--- a/src/endorse-info.proto
+++ b/src/endorse-info.proto
@@ -1,4 +1,4 @@
-package Chronos;
+package chronochat;
message EndorseInfo
{
diff --git a/src/intro-cert-list.proto b/src/intro-cert-list.proto
index 6b65a83..b365aa4 100644
--- a/src/intro-cert-list.proto
+++ b/src/intro-cert-list.proto
@@ -1,4 +1,4 @@
-package Chronos;
+package chronochat;
message IntroCertListMsg
{
diff --git a/src/invitation-dialog.cpp b/src/invitation-dialog.cpp
index 717d515..aac02e0 100644
--- a/src/invitation-dialog.cpp
+++ b/src/invitation-dialog.cpp
@@ -11,7 +11,7 @@
#include "invitation-dialog.hpp"
#include "ui_invitation-dialog.h"
-namespace chronos {
+namespace chronochat {
InvitationDialog::InvitationDialog(QWidget* parent)
: QDialog(parent)
@@ -61,7 +61,7 @@
m_invitationInterest.clear();
}
-} // namespace chronos
+} // namespace chronochat
#if WAF
#include "invitation-dialog.moc"
diff --git a/src/invitation-dialog.hpp b/src/invitation-dialog.hpp
index b072656..030cec8 100644
--- a/src/invitation-dialog.hpp
+++ b/src/invitation-dialog.hpp
@@ -8,8 +8,8 @@
* Author: Yingdi Yu <yingdi@cs.ucla.edu>
*/
-#ifndef CHRONOS_INVITATION_DIALOG_HPP
-#define CHRONOS_INVITATION_DIALOG_HPP
+#ifndef CHRONOCHAT_INVITATION_DIALOG_HPP
+#define CHRONOCHAT_INVITATION_DIALOG_HPP
#include <QDialog>
@@ -21,7 +21,7 @@
class InvitationDialog;
}
-namespace chronos{
+namespace chronochat {
class InvitationDialog : public QDialog
{
@@ -54,6 +54,6 @@
ndn::Name m_invitationInterest;
};
-} // namespace chronos
+} // namespace chronochat
-#endif // CHRONOS_INVITATION_DIALOG_HPP
+#endif // CHRONOCHAT_INVITATION_DIALOG_HPP
diff --git a/src/invitation.cpp b/src/invitation.cpp
index 97b3855..f311ad0 100644
--- a/src/invitation.cpp
+++ b/src/invitation.cpp
@@ -14,7 +14,7 @@
#include "logging.h"
-namespace chronos{
+namespace chronochat {
using std::string;
@@ -76,4 +76,4 @@
{
}
-} // namespace chronos
+} // namespace chronochat
diff --git a/src/invitation.hpp b/src/invitation.hpp
index c724661..f7967ed 100644
--- a/src/invitation.hpp
+++ b/src/invitation.hpp
@@ -8,15 +8,15 @@
* Author: Yingdi Yu <yingdi@cs.ucla.edu>
*/
-#ifndef CHRONOS_INVITATION_HPP
-#define CHRONOS_INVITATION_HPP
+#ifndef CHRONOCHAT_INVITATION_HPP
+#define CHRONOCHAT_INVITATION_HPP
#include "common.hpp"
#include <ndn-cxx/security/identity-certificate.hpp>
-namespace chronos {
+namespace chronochat {
class Invitation
{
@@ -113,6 +113,6 @@
uint64_t m_timestamp;
};
-} // namespace chronos
+} // namespace chronochat
-#endif // CHRONOS_INVITATION_HPP
+#endif // CHRONOCHAT_INVITATION_HPP
diff --git a/src/invite-list-dialog.cpp b/src/invite-list-dialog.cpp
index 7e055f6..435e2f6 100644
--- a/src/invite-list-dialog.cpp
+++ b/src/invite-list-dialog.cpp
@@ -11,7 +11,7 @@
#include "invite-list-dialog.hpp"
#include "ui_invite-list-dialog.h"
-namespace chronos {
+namespace chronochat {
InviteListDialog::InviteListDialog(QWidget* parent)
:QDialog(parent)
@@ -78,7 +78,7 @@
m_contactIdList = idList;
}
-} // namespace chronos
+} // namespace chronochat
#if WAF
#include "invite-list-dialog.moc"
diff --git a/src/invite-list-dialog.hpp b/src/invite-list-dialog.hpp
index 848e07f..e5e8fd3 100644
--- a/src/invite-list-dialog.hpp
+++ b/src/invite-list-dialog.hpp
@@ -8,8 +8,8 @@
* Author: Yingdi Yu <yingdi@cs.ucla.edu>
*/
-#ifndef CHRONOS_INVITE_LIST_DIALOG_HPP
-#define CHRONOS_INVITE_LIST_DIALOG_HPP
+#ifndef CHRONOCHAT_INVITE_LIST_DIALOG_HPP
+#define CHRONOCHAT_INVITE_LIST_DIALOG_HPP
#include <QDialog>
#include <QStringListModel>
@@ -21,7 +21,7 @@
class InviteListDialog;
}
-namespace chronos {
+namespace chronochat {
class InviteListDialog : public QDialog
{
@@ -61,6 +61,6 @@
QStringList m_contactIdList;
};
-} // namespace chronos
+} // namespace chronochat
-#endif // CHRONOS_INVITE_LIST_DIALOG_HPP
+#endif // CHRONOCHAT_INVITE_LIST_DIALOG_HPP
diff --git a/src/main.cpp b/src/main.cpp
index 137dd55..bf2404e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -42,7 +42,7 @@
{
NewApp app(argc, argv);
- chronos::Controller controller;
+ chronochat::Controller controller;
app.setQuitOnLastWindowClosed(false);
diff --git a/src/profile-editor.cpp b/src/profile-editor.cpp
index d7c324a..a55a12c 100644
--- a/src/profile-editor.cpp
+++ b/src/profile-editor.cpp
@@ -20,7 +20,7 @@
// INIT_LOGGER("ProfileEditor")
-namespace chronos {
+namespace chronochat {
ProfileEditor::ProfileEditor(QWidget *parent)
: QDialog(parent)
@@ -100,7 +100,7 @@
this->hide();
}
-} // namespace chronos
+} // namespace chronochat
#if WAF
#include "profile-editor.moc"
diff --git a/src/profile-editor.hpp b/src/profile-editor.hpp
index 1dc5f5e..5323f5c 100644
--- a/src/profile-editor.hpp
+++ b/src/profile-editor.hpp
@@ -8,8 +8,8 @@
* Author: Yingdi Yu <yingdi@cs.ucla.edu>
*/
-#ifndef CHRONOS_PROFILE_EDITOR_HPP
-#define CHRONOS_PROFILE_EDITOR_HPP
+#ifndef CHRONOCHAT_PROFILE_EDITOR_HPP
+#define CHRONOCHAT_PROFILE_EDITOR_HPP
#include <QDialog>
#include <QtSql/QSqlTableModel>
@@ -21,7 +21,7 @@
class ProfileEditor;
}
-namespace chronos {
+namespace chronochat {
class ProfileEditor : public QDialog
{
@@ -59,6 +59,6 @@
QString m_identity;
};
-} // namespace chronos
+} // namespace chronochat
-#endif // CHRONOS_PROFILE_EDITOR_HPP
+#endif // CHRONOCHAT_PROFILE_EDITOR_HPP
diff --git a/src/profile.cpp b/src/profile.cpp
index cd69849..47c873a 100644
--- a/src/profile.cpp
+++ b/src/profile.cpp
@@ -11,7 +11,7 @@
#include "profile.hpp"
#include "logging.h"
-namespace chronos{
+namespace chronochat {
using std::vector;
using std::string;
@@ -79,7 +79,7 @@
void
Profile::encode(std::ostream& os) const
{
- Chronos::ProfileMsg profileMsg;
+ chronochat::ProfileMsg profileMsg;
profileMsg << (*this);
profileMsg.SerializeToOstream(&os);
}
@@ -87,7 +87,7 @@
void
Profile::decode(std::istream& is)
{
- Chronos::ProfileMsg profileMsg;
+ chronochat::ProfileMsg profileMsg;
profileMsg.ParseFromIstream(&is);
profileMsg >> (*this);
}
@@ -115,27 +115,27 @@
return !(*this == profile);
}
-Chronos::ProfileMsg&
-operator<<(Chronos::ProfileMsg& profileMsg, const Profile& profile)
+chronochat::ProfileMsg&
+operator<<(chronochat::ProfileMsg& profileMsg, const Profile& profile)
{
;
for (map<string, string>::const_iterator it = profile.begin(); it != profile.end(); it++) {
- Chronos::ProfileMsg::ProfileEntry* profileEntry = profileMsg.add_entry();
+ chronochat::ProfileMsg::ProfileEntry* profileEntry = profileMsg.add_entry();
profileEntry->set_oid(it->first);
profileEntry->set_data(it->second);
}
return profileMsg;
}
-Chronos::ProfileMsg&
-operator>>(Chronos::ProfileMsg& profileMsg, Profile& profile)
+chronochat::ProfileMsg&
+operator>>(chronochat::ProfileMsg& profileMsg, Profile& profile)
{
for (int i = 0; i < profileMsg.entry_size(); i++) {
- const Chronos::ProfileMsg::ProfileEntry& profileEntry = profileMsg.entry(i);
+ const chronochat::ProfileMsg::ProfileEntry& profileEntry = profileMsg.entry(i);
profile[profileEntry.oid()] = profileEntry.data();
}
return profileMsg;
}
-} // namespace chronos
+} // namespace chronochat
diff --git a/src/profile.hpp b/src/profile.hpp
index 2f4b2cf..cd70cb5 100644
--- a/src/profile.hpp
+++ b/src/profile.hpp
@@ -8,15 +8,15 @@
* Author: Yingdi Yu <yingdi@cs.ucla.edu>
*/
-#ifndef CHRONOS_PROFILE_HPP
-#define CHRONOS_PROFILE_HPP
+#ifndef CHRONOCHAT_PROFILE_HPP
+#define CHRONOCHAT_PROFILE_HPP
#include "common.hpp"
#include <ndn-cxx/security/identity-certificate.hpp>
#include "profile.pb.h"
-namespace chronos {
+namespace chronochat {
class Profile
{
@@ -111,12 +111,12 @@
std::map<std::string, std::string> m_entries;
};
-Chronos::ProfileMsg&
-operator<<(Chronos::ProfileMsg& msg, const Profile& profile);
+chronochat::ProfileMsg&
+operator<<(chronochat::ProfileMsg& msg, const Profile& profile);
-Chronos::ProfileMsg&
-operator>>(Chronos::ProfileMsg& msg, Profile& profile);
+chronochat::ProfileMsg&
+operator>>(chronochat::ProfileMsg& msg, Profile& profile);
-} // namespace chronos
+} // namespace chronochat
-#endif // CHRONOS_PROFILE_HPP
+#endif // CHRONOCHAT_PROFILE_HPP
diff --git a/src/profile.proto b/src/profile.proto
index 586c5c0..3f435af 100644
--- a/src/profile.proto
+++ b/src/profile.proto
@@ -1,4 +1,4 @@
-package Chronos;
+package chronochat;
message ProfileMsg
{
diff --git a/src/set-alias-dialog.cpp b/src/set-alias-dialog.cpp
index f19d98f..ae75a2b 100644
--- a/src/set-alias-dialog.cpp
+++ b/src/set-alias-dialog.cpp
@@ -11,7 +11,7 @@
#include "set-alias-dialog.hpp"
#include "ui_set-alias-dialog.h"
-namespace chronos {
+namespace chronochat {
SetAliasDialog::SetAliasDialog(QWidget* parent)
: QDialog(parent)
@@ -52,7 +52,7 @@
ui->aliasInput->setText(alias);
}
-} // namespace chronos
+} // namespace chronochat
#if WAF
#include "set-alias-dialog.moc"
diff --git a/src/set-alias-dialog.hpp b/src/set-alias-dialog.hpp
index dc43de6..7ae2438 100644
--- a/src/set-alias-dialog.hpp
+++ b/src/set-alias-dialog.hpp
@@ -8,8 +8,8 @@
* Author: Yingdi Yu <yingdi@cs.ucla.edu>
*/
-#ifndef CHRONOS_SET_ALIAS_DIALOG_HPP
-#define CHRONOS_SET_ALIAS_DIALOG_HPP
+#ifndef CHRONOCHAT_SET_ALIAS_DIALOG_HPP
+#define CHRONOCHAT_SET_ALIAS_DIALOG_HPP
#include <QDialog>
@@ -21,7 +21,7 @@
class SetAliasDialog;
}
-namespace chronos {
+namespace chronochat {
class SetAliasDialog : public QDialog
{
@@ -52,6 +52,6 @@
QString m_targetIdentity;
};
-} // namespace chronos
+} // namespace chronochat
-#endif // CHRONOS_SET_ALIAS_DIALOG_HPP
+#endif // CHRONOCHAT_SET_ALIAS_DIALOG_HPP
diff --git a/src/setting-dialog.cpp b/src/setting-dialog.cpp
index ad28625..9f38cac 100644
--- a/src/setting-dialog.cpp
+++ b/src/setting-dialog.cpp
@@ -11,7 +11,7 @@
#include "setting-dialog.hpp"
#include "ui_setting-dialog.h"
-namespace chronos {
+namespace chronochat {
SettingDialog::SettingDialog(QWidget* parent)
: QDialog(parent)
@@ -81,7 +81,7 @@
this->close();
}
-} // namespace chronos
+} // namespace chronochat
#if WAF
#include "setting-dialog.moc"
diff --git a/src/setting-dialog.hpp b/src/setting-dialog.hpp
index ddc8206..a8cef6c 100644
--- a/src/setting-dialog.hpp
+++ b/src/setting-dialog.hpp
@@ -8,8 +8,8 @@
* Author: Yingdi Yu <yingdi@cs.ucla.edu>
*/
-#ifndef CHRONOS_SETTING_DIALOG_HPP
-#define CHRONOS_SETTING_DIALOG_HPP
+#ifndef CHRONOCHAT_SETTING_DIALOG_HPP
+#define CHRONOCHAT_SETTING_DIALOG_HPP
#include <QDialog>
@@ -20,7 +20,7 @@
class SettingDialog;
}
-namespace chronos {
+namespace chronochat {
class SettingDialog : public QDialog
{
@@ -66,6 +66,6 @@
QString m_prefix;
};
-} // namespace chronos
+} // namespace chronochat
-#endif // CHRONOS_SETTING_DIALOG_HPP
+#endif // CHRONOCHAT_SETTING_DIALOG_HPP
diff --git a/src/start-chat-dialog.cpp b/src/start-chat-dialog.cpp
index 52ec3a1..d3949e5 100644
--- a/src/start-chat-dialog.cpp
+++ b/src/start-chat-dialog.cpp
@@ -11,7 +11,7 @@
#include "start-chat-dialog.hpp"
#include "ui_start-chat-dialog.h"
-namespace chronos {
+namespace chronochat {
StartChatDialog::StartChatDialog(QWidget *parent)
: QDialog(parent)
@@ -52,7 +52,7 @@
this->close();
}
-} // namespace chronos
+} // namespace chronochat
#if WAF
#include "start-chat-dialog.moc"
diff --git a/src/start-chat-dialog.hpp b/src/start-chat-dialog.hpp
index be7eafe..d0439d7 100644
--- a/src/start-chat-dialog.hpp
+++ b/src/start-chat-dialog.hpp
@@ -8,8 +8,8 @@
* Author: Yingdi Yu <yingdi@cs.ucla.edu>
*/
-#ifndef CHRONOS_START_CHAT_DIALOG_HPP
-#define CHRONOS_START_CHAT_DIALOG_HPP
+#ifndef CHRONOCHAT_START_CHAT_DIALOG_HPP
+#define CHRONOCHAT_START_CHAT_DIALOG_HPP
#include <QDialog>
@@ -21,7 +21,7 @@
class StartChatDialog;
}
-namespace chronos {
+namespace chronochat {
class StartChatDialog : public QDialog
{
@@ -50,6 +50,6 @@
Ui::StartChatDialog* ui;
};
-} // namespace chronos
+} // namespace chronochat
-#endif // CHRONOS_START_CHAT_DIALOG_HPP
+#endif // CHRONOCHAT_START_CHAT_DIALOG_HPP
diff --git a/src/tree-layout.cpp b/src/tree-layout.cpp
index d2c4d2c..166019f 100644
--- a/src/tree-layout.cpp
+++ b/src/tree-layout.cpp
@@ -13,7 +13,7 @@
#include "tree-layout.hpp"
#include <iostream>
-namespace chronos {
+namespace chronochat {
using std::vector;
using std::map;
@@ -64,4 +64,4 @@
}
}
-} // namespace chronos
+} // namespace chronochat
diff --git a/src/tree-layout.hpp b/src/tree-layout.hpp
index a33142e..514b1ed 100644
--- a/src/tree-layout.hpp
+++ b/src/tree-layout.hpp
@@ -10,12 +10,12 @@
* Yingdi Yu <yingdi@cs.ucla.edu>
*/
-#ifndef CHRONOS_TREE_LAYOUT_HPP
-#define CHRONOS_TREE_LAYOUT_HPP
+#ifndef CHRONOCHAT_TREE_LAYOUT_HPP
+#define CHRONOCHAT_TREE_LAYOUT_HPP
#include "trust-tree-node.hpp"
-namespace chronos {
+namespace chronochat {
class TreeLayout
{
@@ -100,6 +100,6 @@
virtual void setMultipleLevelTreeLayout(TrustTreeNodeList& nodeList);
};
-} // namespace chronos
+} // namespace chronochat
-#endif // CHRONOS_TREE_LAYOUT_HPP
+#endif // CHRONOCHAT_TREE_LAYOUT_HPP
diff --git a/src/trust-tree-node.hpp b/src/trust-tree-node.hpp
index 2fe455a..dc38894 100644
--- a/src/trust-tree-node.hpp
+++ b/src/trust-tree-node.hpp
@@ -8,12 +8,12 @@
* Author: Yingdi Yu <yingdi@cs.ucla.edu>
*/
-#ifndef CHRONOS_TRUST_TREE_NODE_HPP
-#define CHRONOS_TRUST_TREE_NODE_HPP
+#ifndef CHRONOCHAT_TRUST_TREE_NODE_HPP
+#define CHRONOCHAT_TRUST_TREE_NODE_HPP
#include "common.hpp"
-namespace chronos {
+namespace chronochat {
class TrustTreeNode;
@@ -111,6 +111,6 @@
bool m_visited;
};
-} // namespace chronos
+} // namespace chronochat
-#endif // CHRONOS_TRUST_TREE_NODE_HPP
+#endif // CHRONOCHAT_TRUST_TREE_NODE_HPP
diff --git a/src/trust-tree-scene.cpp b/src/trust-tree-scene.cpp
index dc2d802..718b207 100644
--- a/src/trust-tree-scene.cpp
+++ b/src/trust-tree-scene.cpp
@@ -17,7 +17,7 @@
#include <memory>
#endif
-namespace chronos {
+namespace chronochat {
static const double Pi = 3.14159265358979323846264338327950288419717;
@@ -103,7 +103,7 @@
}
}
-} //namespace chronos
+} //namespace chronochat
#if WAF
#include "trust-tree-scene.moc"
diff --git a/src/trust-tree-scene.hpp b/src/trust-tree-scene.hpp
index 90be20e..c8c21c6 100644
--- a/src/trust-tree-scene.hpp
+++ b/src/trust-tree-scene.hpp
@@ -8,8 +8,8 @@
* Author: Yingdi Yu <yingdi@cs.ucla.edu>
*/
-#ifndef CHRONOS_TRUST_TREE_SCENE_HPP
-#define CHRONOS_TRUST_TREE_SCENE_HPP
+#ifndef CHRONOCHAT_TRUST_TREE_SCENE_HPP
+#define CHRONOCHAT_TRUST_TREE_SCENE_HPP
#include <QtGui/QGraphicsScene>
#include <QColor>
@@ -22,7 +22,7 @@
class QGraphicsTextItem;
-namespace chronos {
+namespace chronochat {
class TrustTreeScene : public QGraphicsScene
{
@@ -32,16 +32,16 @@
TrustTreeScene(QWidget* parent = 0);
void
- plotTrustTree(chronos::TrustTreeNodeList& nodeList);
+ plotTrustTree(chronochat::TrustTreeNodeList& nodeList);
private:
void
- plotEdge(const chronos::TrustTreeNodeList& nodeList, int nodeSize);
+ plotEdge(const chronochat::TrustTreeNodeList& nodeList, int nodeSize);
void
- plotNode(const chronos::TrustTreeNodeList& nodeList, int nodeSize);
+ plotNode(const chronochat::TrustTreeNodeList& nodeList, int nodeSize);
};
-} // namespace chronos
+} // namespace chronochat
-#endif // CHRONOS_TRUST_TREE_SCENE_HPP
+#endif // CHRONOCHAT_TRUST_TREE_SCENE_HPP
diff --git a/src/validator-invitation.cpp b/src/validator-invitation.cpp
index dae4302..20d7116 100644
--- a/src/validator-invitation.cpp
+++ b/src/validator-invitation.cpp
@@ -13,7 +13,7 @@
#include "logging.h"
-namespace chronos {
+namespace chronochat {
using std::vector;
@@ -156,4 +156,4 @@
return onValidated();
}
-} // namespace chronos
+} // namespace chronochat
diff --git a/src/validator-invitation.hpp b/src/validator-invitation.hpp
index c2a0e5a..03890a0 100644
--- a/src/validator-invitation.hpp
+++ b/src/validator-invitation.hpp
@@ -8,8 +8,8 @@
* Author: Yingdi Yu <yingdi@cs.ucla.edu>
*/
-#ifndef CHRONOS_VALIDATOR_INVITATION_HPP
-#define CHRONOS_VALIDATOR_INVITATION_HPP
+#ifndef CHRONOCHAT_VALIDATOR_INVITATION_HPP
+#define CHRONOCHAT_VALIDATOR_INVITATION_HPP
#include "common.hpp"
@@ -19,7 +19,7 @@
#include "endorse-certificate.hpp"
-namespace chronos {
+namespace chronochat {
class ValidatorInvitation : public ndn::Validator
{
@@ -87,6 +87,6 @@
TrustAnchors m_trustAnchors;
};
-} // namespace chronos
+} // namespace chronochat
-#endif //CHRONOS_VALIDATOR_INVITATION_HPP
+#endif // CHRONOCHAT_VALIDATOR_INVITATION_HPP
diff --git a/src/validator-panel.cpp b/src/validator-panel.cpp
index 2cb71f8..c3c429d 100644
--- a/src/validator-panel.cpp
+++ b/src/validator-panel.cpp
@@ -12,7 +12,7 @@
#include "logging.h"
-namespace chronos {
+namespace chronochat {
using std::vector;
@@ -86,4 +86,4 @@
return;
}
-} // namespace chronos
+} // namespace chronochat
diff --git a/src/validator-panel.hpp b/src/validator-panel.hpp
index 1277ffe..ab42fe1 100644
--- a/src/validator-panel.hpp
+++ b/src/validator-panel.hpp
@@ -8,8 +8,8 @@
* Author: Yingdi Yu <yingdi@cs.ucla.edu>
*/
-#ifndef CHRONOS_VALIDATOR_PANEL_HPP
-#define CHRONOS_VALIDATOR_PANEL_HPP
+#ifndef CHRONOCHAT_VALIDATOR_PANEL_HPP
+#define CHRONOCHAT_VALIDATOR_PANEL_HPP
#include "common.hpp"
@@ -19,7 +19,7 @@
#include "endorse-certificate.hpp"
-namespace chronos {
+namespace chronochat {
class ValidatorPanel : public ndn::Validator
{
@@ -66,6 +66,6 @@
std::map<Name, ndn::PublicKey> m_trustAnchors;
};
-} // namespace chronos
+} // namespace chronochat
-#endif // CHRONOS_VALIDATOR_PANEL_HPP
+#endif // CHRONOCHAT_VALIDATOR_PANEL_HPP