blob: dbf37472df1145b17eb3556c78de49e6032ed862 [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 Yu9236c432013-10-18 11:29:25 -070017#include "contact-manager.h"
Yingdi Yu3b318c12013-10-15 17:54:00 -070018#include <ndn.cxx/security/identity/identity-manager.h>
19#include <ndn.cxx/security/identity/osx-privatekey-storage.h>
20#include <ndn.cxx/security/identity/basic-identity-storage.h>
21
22using namespace ndn;
Zhenkai Zhu6d589aa2012-05-29 17:34:35 -070023
Alexander Afanasyevb4b92292013-07-09 13:54:59 -070024int main(int argc, char *argv[])
Zhenkai Zhu6d589aa2012-05-29 17:34:35 -070025{
26 QApplication app(argc, argv);
Zhenkai Zhu3a008fc2012-06-08 17:36:39 -070027
Alexander Afanasyevb4b92292013-07-09 13:54:59 -070028
Yingdi Yu847aa862013-10-09 16:35:53 -070029// app.setWindowIcon(QIcon("/Users/yuyingdi/Develop/QT/demo.icns"));
30// // #else
31// // app.setWindowIcon(QIcon("/Users/yuyingdi/Develop/QT/images/icon_large.png"));
32// // #endif
Zhenkai Zhu3a008fc2012-06-08 17:36:39 -070033
Yingdi Yu3b318c12013-10-15 17:54:00 -070034 Ptr<security::BasicIdentityStorage> publicStorage = Ptr<security::BasicIdentityStorage>::Create();
35 Ptr<security::OSXPrivatekeyStorage> privateStorage = Ptr<security::OSXPrivatekeyStorage>::Create();
36 Ptr<security::IdentityManager> identityManager = Ptr<security::IdentityManager>(new security::IdentityManager(publicStorage, privateStorage));
37 Ptr<ContactStorage> contactStorage = Ptr<ContactStorage>(new ContactStorage(identityManager));
Yingdi Yu9236c432013-10-18 11:29:25 -070038 Ptr<ContactManager> contactManager = Ptr<ContactManager>(new ContactManager(contactStorage));
39 ContactPanel contactPanel(contactManager);
40
Alexander Afanasyevb4b92292013-07-09 13:54:59 -070041
Yingdi Yu847aa862013-10-09 16:35:53 -070042 contactPanel.show ();
43 contactPanel.activateWindow ();
44 contactPanel.raise ();
45
Zhenkai Zhu6d589aa2012-05-29 17:34:35 -070046 return app.exec();
47}