Alexander Afanasyev | c74a602 | 2011-08-15 20:01:35 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 2 | /* |
Ilya Moiseenko | 956d054 | 2012-01-02 15:26:40 -0800 | [diff] [blame] | 3 | * Copyright (c) 2011 University of California, Los Angeles |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 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 | * |
Ilya Moiseenko | 1cf6b0a | 2011-08-29 13:02:34 -0700 | [diff] [blame] | 18 | * Authors: Alexander Afanasyev <alexander.afanasyev@ucla.edu> |
| 19 | Ilya Moiseenko <iliamo@cs.ucla.edu> |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 20 | */ |
Ilya Moiseenko | 1cf6b0a | 2011-08-29 13:02:34 -0700 | [diff] [blame] | 21 | |
Alexander Afanasyev | 4a4ea60 | 2012-06-06 11:12:45 -0700 | [diff] [blame] | 22 | #ifndef CCNX_APP_FACE_H |
| 23 | #define CCNX_APP_FACE_H |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 24 | |
| 25 | #include "ccnx-face.h" |
Ilya Moiseenko | 1a8be03 | 2012-01-18 12:51:09 -0800 | [diff] [blame] | 26 | #include "ns3/traced-callback.h" |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 27 | |
Ilya Moiseenko | 1cf6b0a | 2011-08-29 13:02:34 -0700 | [diff] [blame] | 28 | namespace ns3 |
| 29 | { |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 30 | |
Alexander Afanasyev | c5a23e2 | 2011-09-07 00:37:36 -0700 | [diff] [blame] | 31 | class CcnxInterestHeader; |
| 32 | class CcnxContentObjectHeader; |
| 33 | class Packet; |
Alexander Afanasyev | 19426ef | 2011-11-23 20:55:28 -0800 | [diff] [blame] | 34 | class CcnxApp; |
Alexander Afanasyev | c5a23e2 | 2011-09-07 00:37:36 -0700 | [diff] [blame] | 35 | |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 36 | /** |
Alexander Afanasyev | 56f79ea | 2011-08-17 23:54:27 -0700 | [diff] [blame] | 37 | * \ingroup ccnx-face |
| 38 | * \brief Implementation of application CCNx face |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 39 | * |
Alexander Afanasyev | 56f79ea | 2011-08-17 23:54:27 -0700 | [diff] [blame] | 40 | * 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 Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 43 | * |
Alexander Afanasyev | 4a4ea60 | 2012-06-06 11:12:45 -0700 | [diff] [blame] | 44 | * \see CcnxAppFace, CcnxNetDeviceFace, CcnxIpv4Face, CcnxUdpFace |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 45 | */ |
Alexander Afanasyev | 4a4ea60 | 2012-06-06 11:12:45 -0700 | [diff] [blame] | 46 | class CcnxAppFace : public CcnxFace |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 47 | { |
| 48 | public: |
Alexander Afanasyev | cbe92ae | 2011-12-16 13:06:18 -0800 | [diff] [blame] | 49 | static TypeId |
| 50 | GetTypeId (); |
| 51 | |
Alexander Afanasyev | 56f79ea | 2011-08-17 23:54:27 -0700 | [diff] [blame] | 52 | /** |
| 53 | * \brief Default constructor |
| 54 | */ |
Alexander Afanasyev | 4a4ea60 | 2012-06-06 11:12:45 -0700 | [diff] [blame] | 55 | CcnxAppFace (Ptr<CcnxApp> app); |
| 56 | virtual ~CcnxAppFace(); |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 57 | |
Alexander Afanasyev | 56f79ea | 2011-08-17 23:54:27 -0700 | [diff] [blame] | 58 | //////////////////////////////////////////////////////////////////// |
| 59 | // methods overloaded from CcnxFace |
Alexander Afanasyev | c5a23e2 | 2011-09-07 00:37:36 -0700 | [diff] [blame] | 60 | virtual void |
| 61 | RegisterProtocolHandler (ProtocolHandler handler); |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 62 | |
Alexander Afanasyev | 09c7deb | 2011-11-23 14:50:10 -0800 | [diff] [blame] | 63 | protected: |
Alexander Afanasyev | 1c0248b | 2012-07-24 15:59:50 -0700 | [diff] [blame] | 64 | virtual bool |
Alexander Afanasyev | 09c7deb | 2011-11-23 14:50:10 -0800 | [diff] [blame] | 65 | SendImpl (Ptr<Packet> p); |
| 66 | |
| 67 | public: |
Alexander Afanasyev | c5a23e2 | 2011-09-07 00:37:36 -0700 | [diff] [blame] | 68 | virtual std::ostream& |
| 69 | Print (std::ostream &os) const; |
Alexander Afanasyev | 56f79ea | 2011-08-17 23:54:27 -0700 | [diff] [blame] | 70 | //////////////////////////////////////////////////////////////////// |
Alexander Afanasyev | c5a23e2 | 2011-09-07 00:37:36 -0700 | [diff] [blame] | 71 | |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 72 | private: |
Alexander Afanasyev | 4a4ea60 | 2012-06-06 11:12:45 -0700 | [diff] [blame] | 73 | CcnxAppFace (); |
| 74 | CcnxAppFace (const CcnxAppFace &); ///< \brief Disabled copy constructor |
| 75 | CcnxAppFace& operator= (const CcnxAppFace &); ///< \brief Disabled copy operator |
Alexander Afanasyev | c5a23e2 | 2011-09-07 00:37:36 -0700 | [diff] [blame] | 76 | |
| 77 | private: |
Alexander Afanasyev | 19426ef | 2011-11-23 20:55:28 -0800 | [diff] [blame] | 78 | Ptr<CcnxApp> m_app; |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 79 | }; |
| 80 | |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 81 | } // namespace ns3 |
| 82 | |
Alexander Afanasyev | 4a4ea60 | 2012-06-06 11:12:45 -0700 | [diff] [blame] | 83 | #endif // CCNX_APP_FACE_H |