blob: 90ebeced8e5fe2e1730a09436890ffd8072941fc [file] [log] [blame]
Alexander Afanasyev79a5bd62013-06-23 22:12:39 -07001/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2013 University of California, Los Angeles
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
19 */
20
21#include "ndn-api-app.h"
22
23NS_LOG_COMPONENT_DEFINE ("ndn.ApiApp");
24
25namespace ns3 {
26namespace ndn {
27
28// Necessary if you are planning to use ndn::AppHelper
29NS_OBJECT_ENSURE_REGISTERED (ApiApp);
30
31TypeId
32ApiApp::GetTypeId ()
33{
34 static TypeId tid = TypeId ("ns3::ndn::ApiApp")
35 .SetParent<Application> ()
36 .AddConstructor<ApiApp> ()
37 ;
38
39 return tid;
40}
41
42ApiApp::ApiApp ()
43{
Alexander Afanasyev5bee19e2013-07-10 14:33:57 -070044 // m_handler = CreateObject<Handler> ();
Alexander Afanasyev79a5bd62013-06-23 22:12:39 -070045}
46
47void
48ApiApp::RequestData ()
49{
Alexander Afanasyev5bee19e2013-07-10 14:33:57 -070050 // m_handler->sendInterest ("/test/prefix", boost::bind (&ApiApp::OnData
Alexander Afanasyev79a5bd62013-06-23 22:12:39 -070051}
52
53void
54ApiApp::StartApplication ()
55{
Alexander Afanasyev5bee19e2013-07-10 14:33:57 -070056 // m_handler->SetNode (GetNode ());
57 // m_handler->StartApplication ();
Alexander Afanasyev79a5bd62013-06-23 22:12:39 -070058
Alexander Afanasyev5bee19e2013-07-10 14:33:57 -070059 // Simulator::Schedule (Seconds (1), &::ns3::ndn::ApiApp::RequestData, this);
Alexander Afanasyev79a5bd62013-06-23 22:12:39 -070060}
61
62void
63ApiApp::StopApplication ()
64{
Alexander Afanasyev5bee19e2013-07-10 14:33:57 -070065 // m_handler->StopApplication ();
Alexander Afanasyev79a5bd62013-06-23 22:12:39 -070066}
67
68} // namespace ndn
69} // namespace ns3
70