blob: 9464195918291851dc14f632d00420a252267838 [file] [log] [blame]
Yingdi Yu847aa862013-10-09 16:35:53 -07001/* -*- 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 *
8 * Author: Yingdi Yu <yingdi@cs.ucla.edu>
9 */
10
11#include <QApplication>
12#include <QSystemTrayIcon>
13
14#include "chronochat.h"
15#include "contactpanel.h"
Yingdi Yu3b318c12013-10-15 17:54:00 -070016#include "contact-storage.h"
Yingdi Yu4685b1b2013-10-18 17:05:02 -070017#include "dns-storage.h"
Yingdi Yu9236c432013-10-18 11:29:25 -070018#include "contact-manager.h"
Yingdi Yu3b318c12013-10-15 17:54:00 -070019#include <ndn.cxx/security/identity/identity-manager.h>
20#include <ndn.cxx/security/identity/osx-privatekey-storage.h>
21#include <ndn.cxx/security/identity/basic-identity-storage.h>
22
23using namespace ndn;
Zhenkai Zhu6d589aa2012-05-29 17:34:35 -070024
Alexander Afanasyevb4b92292013-07-09 13:54:59 -070025int main(int argc, char *argv[])
Zhenkai Zhu6d589aa2012-05-29 17:34:35 -070026{
27 QApplication app(argc, argv);
Zhenkai Zhu3a008fc2012-06-08 17:36:39 -070028
Alexander Afanasyevb4b92292013-07-09 13:54:59 -070029
Yingdi Yu847aa862013-10-09 16:35:53 -070030// app.setWindowIcon(QIcon("/Users/yuyingdi/Develop/QT/demo.icns"));
31// // #else
32// // app.setWindowIcon(QIcon("/Users/yuyingdi/Develop/QT/images/icon_large.png"));
33// // #endif
Zhenkai Zhu3a008fc2012-06-08 17:36:39 -070034
Yingdi Yu4685b1b2013-10-18 17:05:02 -070035 Ptr<ContactStorage> contactStorage = Ptr<ContactStorage>(new ContactStorage());
36 Ptr<DnsStorage> dnsStorage = Ptr<DnsStorage>(new DnsStorage());
37 Ptr<ContactManager> contactManager = Ptr<ContactManager>(new ContactManager(contactStorage, dnsStorage));
Yingdi Yu9236c432013-10-18 11:29:25 -070038
Yingdi Yu4685b1b2013-10-18 17:05:02 -070039 ContactPanel contactPanel(contactManager);
Alexander Afanasyevb4b92292013-07-09 13:54:59 -070040
Yingdi Yu847aa862013-10-09 16:35:53 -070041 contactPanel.show ();
42 contactPanel.activateWindow ();
43 contactPanel.raise ();
44
Zhenkai Zhu6d589aa2012-05-29 17:34:35 -070045 return app.exec();
46}