Junxiao Shi | 6e69432 | 2014-04-03 10:27:13 -0700 | [diff] [blame^] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 | /** |
| 3 | * Copyright (C) 2014 Named Data Networking Project |
| 4 | * See COPYING for copyright and distribution information. |
| 5 | */ |
| 6 | |
| 7 | #ifndef NFD_MGMT_FACE_FLAGS_HPP |
| 8 | #define NFD_MGMT_FACE_FLAGS_HPP |
| 9 | |
| 10 | #include "face/face.hpp" |
| 11 | #include <ndn-cpp-dev/management/nfd-face-flags.hpp> |
| 12 | |
| 13 | namespace nfd { |
| 14 | |
| 15 | inline uint64_t |
| 16 | getFaceFlags(const Face& face) |
| 17 | { |
| 18 | uint64_t flags = 0; |
| 19 | if (face.isLocal()) { |
| 20 | flags |= ndn::nfd::FACE_IS_LOCAL; |
| 21 | } |
| 22 | if (face.isOnDemand()) { |
| 23 | flags |= ndn::nfd::FACE_IS_ON_DEMAND; |
| 24 | } |
| 25 | return flags; |
| 26 | } |
| 27 | |
| 28 | } // namespace nfd |
| 29 | |
| 30 | #endif // NFD_MGMT_FACE_FLAGS_HPP |