blob: 8c03e4ee9cb21531b315da7d4d51b12878afb6d9 [file] [log] [blame]
Steve DiBenedetto471c0602014-02-18 12:32:00 -07001/* -*- 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_LOCAL_CONTROL_HEADER_MANAGER_HPP
8#define NFD_MGMT_LOCAL_CONTROL_HEADER_MANAGER_HPP
9
10#include "common.hpp"
11#include "face/face.hpp"
12#include "mgmt/app-face.hpp"
13#include "mgmt/manager-base.hpp"
14
15namespace nfd {
16
17class LocalControlHeaderManager : public ManagerBase
18{
19public:
20 LocalControlHeaderManager(function<shared_ptr<Face>(FaceId)> getFace,
21 shared_ptr<AppFace> face);
22
23 void
24 onLocalControlHeaderRequest(const Interest& request);
25
Steve DiBenedetto471c0602014-02-18 12:32:00 -070026private:
27 function<shared_ptr<Face>(FaceId)> m_getFace;
28
29 static const Name COMMAND_PREFIX; // /localhost/nfd/control-header
30
31 // number of components in an invalid, but not malformed, unsigned command.
32 // (/localhost/nfd/control-headeer + control-module + verb) = 5
33 static const size_t COMMAND_UNSIGNED_NCOMPS;
34
35 // number of components in a valid signed Interest.
36 // 5 in mock (see UNSIGNED_NCOMPS)
37 static const size_t COMMAND_SIGNED_NCOMPS;
38};
39
40} // namespace nfd
41
42#endif // NFD_MGMT_LOCAL_CONTROL_HEADER_MANAGER_HPP
43
44
45