blob: 967ee13bee6446cd7786fb45f61a575710d90a3f [file] [log] [blame]
Alexander Afanasyevc74a6022011-08-15 20:01:35 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
Alexander Afanasyev98256102011-08-14 01:00:02 -07002/*
Ilya Moiseenko956d0542012-01-02 15:26:40 -08003 * Copyright (c) 2011 University of California, Los Angeles
Alexander Afanasyev98256102011-08-14 01:00:02 -07004 *
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 *
Ilya Moiseenko1cf6b0a2011-08-29 13:02:34 -070018 * Authors: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
19 Ilya Moiseenko <iliamo@cs.ucla.edu>
Alexander Afanasyev98256102011-08-14 01:00:02 -070020 */
Ilya Moiseenko1cf6b0a2011-08-29 13:02:34 -070021
Alexander Afanasyev4a4ea602012-06-06 11:12:45 -070022#ifndef CCNX_APP_FACE_H
23#define CCNX_APP_FACE_H
Alexander Afanasyev98256102011-08-14 01:00:02 -070024
25#include "ccnx-face.h"
Ilya Moiseenko1a8be032012-01-18 12:51:09 -080026#include "ns3/traced-callback.h"
Alexander Afanasyev98256102011-08-14 01:00:02 -070027
Ilya Moiseenko1cf6b0a2011-08-29 13:02:34 -070028namespace ns3
29{
Alexander Afanasyev98256102011-08-14 01:00:02 -070030
Alexander Afanasyevc5a23e22011-09-07 00:37:36 -070031class CcnxInterestHeader;
32class CcnxContentObjectHeader;
33class Packet;
Alexander Afanasyev19426ef2011-11-23 20:55:28 -080034class CcnxApp;
Alexander Afanasyevc5a23e22011-09-07 00:37:36 -070035
Alexander Afanasyev98256102011-08-14 01:00:02 -070036/**
Alexander Afanasyev56f79ea2011-08-17 23:54:27 -070037 * \ingroup ccnx-face
38 * \brief Implementation of application CCNx face
Alexander Afanasyev98256102011-08-14 01:00:02 -070039 *
Alexander Afanasyev56f79ea2011-08-17 23:54:27 -070040 * This class defines basic functionality of CCNx face. Face is core
41 * component responsible for actual delivery of data packet to and
42 * from CCNx stack
Alexander Afanasyev98256102011-08-14 01:00:02 -070043 *
Alexander Afanasyev4a4ea602012-06-06 11:12:45 -070044 * \see CcnxAppFace, CcnxNetDeviceFace, CcnxIpv4Face, CcnxUdpFace
Alexander Afanasyev98256102011-08-14 01:00:02 -070045 */
Alexander Afanasyev4a4ea602012-06-06 11:12:45 -070046class CcnxAppFace : public CcnxFace
Alexander Afanasyev98256102011-08-14 01:00:02 -070047{
48public:
Alexander Afanasyevcbe92ae2011-12-16 13:06:18 -080049 static TypeId
50 GetTypeId ();
51
Alexander Afanasyev56f79ea2011-08-17 23:54:27 -070052 /**
53 * \brief Default constructor
54 */
Alexander Afanasyev4a4ea602012-06-06 11:12:45 -070055 CcnxAppFace (Ptr<CcnxApp> app);
56 virtual ~CcnxAppFace();
Alexander Afanasyev98256102011-08-14 01:00:02 -070057
Alexander Afanasyev56f79ea2011-08-17 23:54:27 -070058 ////////////////////////////////////////////////////////////////////
59 // methods overloaded from CcnxFace
Alexander Afanasyevc5a23e22011-09-07 00:37:36 -070060 virtual void
61 RegisterProtocolHandler (ProtocolHandler handler);
Alexander Afanasyev98256102011-08-14 01:00:02 -070062
Alexander Afanasyev09c7deb2011-11-23 14:50:10 -080063protected:
Alexander Afanasyev1c0248b2012-07-24 15:59:50 -070064 virtual bool
Alexander Afanasyev09c7deb2011-11-23 14:50:10 -080065 SendImpl (Ptr<Packet> p);
66
67public:
Alexander Afanasyevc5a23e22011-09-07 00:37:36 -070068 virtual std::ostream&
69 Print (std::ostream &os) const;
Alexander Afanasyev56f79ea2011-08-17 23:54:27 -070070 ////////////////////////////////////////////////////////////////////
Alexander Afanasyevc5a23e22011-09-07 00:37:36 -070071
Alexander Afanasyev98256102011-08-14 01:00:02 -070072private:
Alexander Afanasyev4a4ea602012-06-06 11:12:45 -070073 CcnxAppFace ();
74 CcnxAppFace (const CcnxAppFace &); ///< \brief Disabled copy constructor
75 CcnxAppFace& operator= (const CcnxAppFace &); ///< \brief Disabled copy operator
Alexander Afanasyevc5a23e22011-09-07 00:37:36 -070076
77private:
Alexander Afanasyev19426ef2011-11-23 20:55:28 -080078 Ptr<CcnxApp> m_app;
Alexander Afanasyev98256102011-08-14 01:00:02 -070079};
80
Alexander Afanasyev98256102011-08-14 01:00:02 -070081} // namespace ns3
82
Alexander Afanasyev4a4ea602012-06-06 11:12:45 -070083#endif // CCNX_APP_FACE_H