00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _PROPHET_LINK_H_
00018 #define _PROPHET_LINK_H_
00019
00020 #include "prophet/Link.h"
00021 #include "contacts/Link.h"
00022
00023 namespace dtn
00024 {
00025
00026 class ProphetLink : public prophet::Link
00027 {
00028
00029 public:
00030 ProphetLink(const LinkRef& link)
00031 : ref_("ProphetLink")
00032 {
00033 ref_ = link;
00034 }
00035
00036 ~ProphetLink()
00037 {
00038 ref_ = NULL;
00039 }
00040
00041 const LinkRef& ref() const { return ref_; }
00042
00044 const char* nexthop() const
00045 {
00046 return (ref().object() == NULL) ? "" : ref()->nexthop();
00047 }
00048 const char* remote_eid() const
00049 {
00050 return (ref().object() == NULL) ? "" : ref()->remote_eid().c_str();
00051 }
00053
00054 protected:
00055
00056 LinkRef ref_;
00057 };
00058
00059 };
00060
00061 #endif // _PROPHET_LINK_H_