Yingdi Yu | 614db14 | 2013-10-09 16:35:53 -0700 | [diff] [blame] | 1 | /* -*- 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 Yu | def9061 | 2013-10-09 22:34:42 -0700 | [diff] [blame] | 12 | #include <QSystemTrayIcon> |
Yingdi Yu | 614db14 | 2013-10-09 16:35:53 -0700 | [diff] [blame] | 13 | |
| 14 | #include "chronochat.h" |
Yingdi Yu | 9e0dc29 | 2013-10-10 11:39:45 -0700 | [diff] [blame] | 15 | #include "contactpanel.h" |
Yingdi Yu | 0a6b6c5 | 2013-10-15 17:54:00 -0700 | [diff] [blame] | 16 | #include "contact-storage.h" |
Yingdi Yu | 0b82a4e | 2013-10-18 11:29:25 -0700 | [diff] [blame] | 17 | #include "contact-manager.h" |
Yingdi Yu | 0a6b6c5 | 2013-10-15 17:54:00 -0700 | [diff] [blame] | 18 | #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 | |
| 22 | using namespace ndn; |
Yingdi Yu | 614db14 | 2013-10-09 16:35:53 -0700 | [diff] [blame] | 23 | |
| 24 | int main(int argc, char *argv[]) |
| 25 | { |
| 26 | QApplication app(argc, argv); |
| 27 | |
Yingdi Yu | def9061 | 2013-10-09 22:34:42 -0700 | [diff] [blame] | 28 | |
| 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 Yu | 614db14 | 2013-10-09 16:35:53 -0700 | [diff] [blame] | 33 | |
Yingdi Yu | 0a6b6c5 | 2013-10-15 17:54:00 -0700 | [diff] [blame] | 34 | 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 Yu | 0b82a4e | 2013-10-18 11:29:25 -0700 | [diff] [blame] | 38 | Ptr<ContactManager> contactManager = Ptr<ContactManager>(new ContactManager(contactStorage)); |
| 39 | ContactPanel contactPanel(contactManager); |
| 40 | |
Yingdi Yu | 614db14 | 2013-10-09 16:35:53 -0700 | [diff] [blame] | 41 | |
Yingdi Yu | 9e0dc29 | 2013-10-10 11:39:45 -0700 | [diff] [blame] | 42 | contactPanel.show (); |
| 43 | contactPanel.activateWindow (); |
| 44 | contactPanel.raise (); |
Yingdi Yu | 614db14 | 2013-10-09 16:35:53 -0700 | [diff] [blame] | 45 | |
| 46 | return app.exec(); |
| 47 | } |