blob: 98380e8b65474dcf0de378bae03b869e0edcfc7c [file] [log] [blame]
Yingdi Yu42f66462013-10-31 17:38:22 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2/*
3 * Copyright (c) 2013, Regents of the University of California
4 * Yingdi Yu
5 *
6 * BSD license, See the LICENSE file for more information
7 *
8 * Author: Yingdi Yu <yingdi@cs.ucla.edu>
9 */
10
11#ifndef CHRONOS_INVITATION_H
12#define CHRONOS_INVITATION_H
13
14
Yingdi Yu64206112013-12-24 11:16:32 +080015#include <ndn-cpp/name.hpp>
Yingdi Yu42f66462013-10-31 17:38:22 -070016
17class ChronosInvitation
18{
19public:
Yingdi Yuc9ffa9f2014-01-13 11:19:47 -080020 struct Error : public std::runtime_error { Error(const std::string &what) : std::runtime_error(what) {} };
21
Yingdi Yu42f66462013-10-31 17:38:22 -070022 ChronosInvitation() {}
23
24 ChronosInvitation(const ndn::Name& interestName);
25
26 ChronosInvitation(const ChronosInvitation& invitation);
27
28 virtual
29 ~ChronosInvitation() {};
30
Yingdi Yu64206112013-12-24 11:16:32 +080031 const ndn::Name&
Yingdi Yu42f66462013-10-31 17:38:22 -070032 getInviteeNameSpace() const
33 { return m_inviteeNameSpace; }
34
Yingdi Yu64206112013-12-24 11:16:32 +080035 const ndn::Name&
Yingdi Yu42f66462013-10-31 17:38:22 -070036 getChatroom() const
37 { return m_chatroom; }
38
Yingdi Yu64206112013-12-24 11:16:32 +080039 const ndn::Name&
Yingdi Yu42f66462013-10-31 17:38:22 -070040 getInviterPrefix() const
41 { return m_inviterPrefix; }
42
Yingdi Yu64206112013-12-24 11:16:32 +080043 const ndn::Name&
Yingdi Yu42f66462013-10-31 17:38:22 -070044 getInviterCertificateName() const
45 { return m_inviterCertificateName; }
46
Yingdi Yuc9ffa9f2014-01-13 11:19:47 -080047 const ndn::Buffer&
Yingdi Yu42f66462013-10-31 17:38:22 -070048 getSignatureBits() const
49 { return m_signatureBits; }
50
Yingdi Yu64206112013-12-24 11:16:32 +080051 const ndn::Name&
Yingdi Yu42f66462013-10-31 17:38:22 -070052 getInviterNameSpace() const
53 { return m_inviterNameSpace; }
54
Yingdi Yuc9ffa9f2014-01-13 11:19:47 -080055 const ndn::Buffer&
Yingdi Yu42f66462013-10-31 17:38:22 -070056 getSignedBlob() const
57 { return m_signedBlob; }
58
Yingdi Yu64206112013-12-24 11:16:32 +080059 const ndn::Name&
Yingdi Yu42f66462013-10-31 17:38:22 -070060 getInterestName() const
61 { return m_interestName; }
62
63private:
64 ndn::Name m_interestName;
65
66 ndn::Name m_inviteeNameSpace;
67 ndn::Name m_chatroom;
68 ndn::Name m_inviterPrefix;
69 ndn::Name m_inviterCertificateName;
Yingdi Yuc9ffa9f2014-01-13 11:19:47 -080070 ndn::Buffer m_signatureBits;
Yingdi Yu42f66462013-10-31 17:38:22 -070071 ndn::Name m_inviterNameSpace;
72
Yingdi Yuc9ffa9f2014-01-13 11:19:47 -080073 ndn::Buffer m_signedBlob;
Yingdi Yu42f66462013-10-31 17:38:22 -070074};
75
76#endif