blob: dbf37472df1145b17eb3556c78de49e6032ed862 [file] [log] [blame]
Yingdi Yu614db142013-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>
Yingdi Yudef90612013-10-09 22:34:42 -070012#include <QSystemTrayIcon>
Yingdi Yu614db142013-10-09 16:35:53 -070013
14#include "chronochat.h"
Yingdi Yu9e0dc292013-10-10 11:39:45 -070015#include "contactpanel.h"
Yingdi Yu0a6b6c52013-10-15 17:54:00 -070016#include "contact-storage.h"
Yingdi Yu0b82a4e2013-10-18 11:29:25 -070017#include "contact-manager.h"
Yingdi Yu0a6b6c52013-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;
Yingdi Yu614db142013-10-09 16:35:53 -070023
24int main(int argc, char *argv[])
25{
26 QApplication app(argc, argv);
27
Yingdi Yudef90612013-10-09 22:34:42 -070028
29// 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
Yingdi Yu614db142013-10-09 16:35:53 -070033
Yingdi Yu0a6b6c52013-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 Yu0b82a4e2013-10-18 11:29:25 -070038 Ptr<ContactManager> contactManager = Ptr<ContactManager>(new ContactManager(contactStorage));
39 ContactPanel contactPanel(contactManager);
40
Yingdi Yu614db142013-10-09 16:35:53 -070041
Yingdi Yu9e0dc292013-10-10 11:39:45 -070042 contactPanel.show ();
43 contactPanel.activateWindow ();
44 contactPanel.raise ();
Yingdi Yu614db142013-10-09 16:35:53 -070045
46 return app.exec();
47}