<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>DTN Reference Implementation: ProphetBundleCore.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.6 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="main.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <h1>ProphetBundleCore.h</h1><a href="ProphetBundleCore_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> <a name="l00002"></a>00002 <span class="comment"> * Copyright 2007 Baylor University</span> <a name="l00003"></a>00003 <span class="comment"> * </span> <a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span> <a name="l00005"></a>00005 <span class="comment"> * you may not use this file except in compliance with the License.</span> <a name="l00006"></a>00006 <span class="comment"> * You may obtain a copy of the License at</span> <a name="l00007"></a>00007 <span class="comment"> * </span> <a name="l00008"></a>00008 <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span> <a name="l00009"></a>00009 <span class="comment"> * </span> <a name="l00010"></a>00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span> <a name="l00011"></a>00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span> <a name="l00012"></a>00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span> <a name="l00013"></a>00013 <span class="comment"> * See the License for the specific language governing permissions and</span> <a name="l00014"></a>00014 <span class="comment"> * limitations under the License.</span> <a name="l00015"></a>00015 <span class="comment"> */</span> <a name="l00016"></a>00016 <a name="l00017"></a>00017 <span class="preprocessor">#ifndef _PROPHET_BUNDLE_CORE_H_</span> <a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define _PROPHET_BUNDLE_CORE_H_</span> <a name="l00019"></a>00019 <span class="preprocessor"></span> <a name="l00020"></a>00020 <span class="preprocessor">#include "<a class="code" href="servlib_2prophet_2Node_8h.html">prophet/Node.h</a>"</span> <a name="l00021"></a>00021 <span class="preprocessor">#include "<a class="code" href="Params_8h.html">prophet/Params.h</a>"</span> <a name="l00022"></a>00022 <span class="preprocessor">#include "<a class="code" href="prophet_2BundleList_8h.html">prophet/BundleList.h</a>"</span> <a name="l00023"></a>00023 <span class="preprocessor">#include "<a class="code" href="BundleCore_8h.html">prophet/BundleCore.h</a>"</span> <a name="l00024"></a>00024 <span class="preprocessor">#include "<a class="code" href="Repository_8h.html">prophet/Repository.h</a>"</span> <a name="l00025"></a>00025 <span class="preprocessor">#include "<a class="code" href="contacts_2Link_8h.html">contacts/Link.h</a>"</span> <a name="l00026"></a>00026 <span class="preprocessor">#include "<a class="code" href="bundling_2Bundle_8h.html">bundling/Bundle.h</a>"</span> <a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="BundleActions_8h.html">bundling/BundleActions.h</a>"</span> <a name="l00028"></a>00028 <span class="preprocessor">#include "<a class="code" href="bundling_2BundleList_8h.html">bundling/BundleList.h</a>"</span> <a name="l00029"></a>00029 <span class="preprocessor">#include "<a class="code" href="ProphetBundleList_8h.html">ProphetBundleList.h</a>"</span> <a name="l00030"></a>00030 <span class="preprocessor">#include "<a class="code" href="ProphetLinkList_8h.html">ProphetLinkList.h</a>"</span> <a name="l00031"></a>00031 <span class="preprocessor">#include "<a class="code" href="ProphetNodeList_8h.html">ProphetNodeList.h</a>"</span> <a name="l00032"></a>00032 <span class="preprocessor">#include <oasys/debug/Log.h></span> <a name="l00033"></a>00033 <span class="preprocessor">#include <oasys/thread/Lock.h></span> <a name="l00034"></a>00034 <a name="l00035"></a>00035 <span class="preprocessor">#include <string></span> <a name="l00036"></a>00036 <a name="l00037"></a>00037 <span class="keyword">namespace </span>dtn <a name="l00038"></a>00038 { <a name="l00039"></a>00039 <a name="l00044"></a><a class="code" href="classdtn_1_1ProphetBundleCore.html">00044</a> <span class="keyword">class </span><a class="code" href="classdtn_1_1ProphetBundleCore.html" title="Implements the prophet::BundleCore API by integrating DTN&#39;s system services.">ProphetBundleCore</a> : <span class="keyword">public</span> prophet::BundleCore, <a name="l00045"></a>00045 <span class="keyword">public</span> prophet::Repository::BundleCoreRep, <a name="l00046"></a>00046 <span class="keyword">public</span> oasys::<a class="code" href="classoasys_1_1Logger.html">Logger</a> <a name="l00047"></a>00047 { <a name="l00048"></a>00048 <span class="keyword">public</span>: <a name="l00049"></a>00049 <a name="l00053"></a>00053 <a class="code" href="classdtn_1_1ProphetBundleCore.html#51d7ce77085e8a409489b7c7fe301ae6" title="Constructor.">ProphetBundleCore</a>(<span class="keyword">const</span> std::string& <a class="code" href="classdtn_1_1ProphetBundleCore.html#91b31ede5c10693731653108fc46699d" title="Virtual from prophet::BundleCore.">local_eid</a>, <a name="l00054"></a>00054 <a class="code" href="classdtn_1_1BundleActions.html" title="Intermediary class that provides a utility interface to help routers more easily...">BundleActions</a>* actions, <a name="l00055"></a>00055 oasys::SpinLock* lock); <a name="l00056"></a>00056 <a name="l00060"></a>00060 <a class="code" href="classdtn_1_1ProphetBundleCore.html#51d7ce77085e8a409489b7c7fe301ae6" title="Constructor.">ProphetBundleCore</a>(oasys::Builder); <a name="l00061"></a>00061 <a name="l00065"></a>00065 <span class="keyword">virtual</span> <a class="code" href="classdtn_1_1ProphetBundleCore.html#d1c03d7f36b85902bf04851ccedecb41" title="Destructor.">~ProphetBundleCore</a>(); <a name="l00066"></a>00066 <a name="l00068"></a>00068 <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1ProphetBundleCore.html#90e8d30f6e84420cb0dedf94e7f0584b" title="Virtual from prophet::BundleCore.">is_route</a>(<span class="keyword">const</span> std::string& dest_id, <a name="l00069"></a>00069 <span class="keyword">const</span> std::string& route) <span class="keyword">const</span>; <a name="l00070"></a>00070 <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1ProphetBundleCore.html#41b8f2fddbfebd06f18e9ba8fce619b5" title="Virtual from prophet::BundleCore.">should_fwd</a>(<span class="keyword">const</span> <a class="code" href="classprophet_1_1Bundle.html" title="Facade interface between Prophet router and host implmentation&#39;s Bundle representation...">prophet::Bundle</a>* bundle, <a name="l00071"></a>00071 <span class="keyword">const</span> <a class="code" href="classprophet_1_1Link.html">prophet::Link</a>* link) <span class="keyword">const</span>; <a name="l00072"></a>00072 std::string <a class="code" href="classdtn_1_1ProphetBundleCore.html#3af8d47db2a95a24cae949a7ae182c88" title="Virtual from prophet::BundleCore.">get_route</a>(<span class="keyword">const</span> std::string& dest_id) <span class="keyword">const</span>; <a name="l00073"></a>00073 std::string <a class="code" href="classdtn_1_1ProphetBundleCore.html#9fa1cc138d96df53f2984dedab3495b7" title="Virtual from prophet::BundleCore.">get_route_pattern</a>(<span class="keyword">const</span> std::string& dest_id) <span class="keyword">const</span>; <a name="l00074"></a>00074 u_int64_t <a class="code" href="classdtn_1_1ProphetBundleCore.html#ce3e0bbd59d7c7af4ea8d985f5e982bc" title="Virtual from prophet::BundleCore.">max_bundle_quota</a>() <span class="keyword">const</span>; <a name="l00075"></a>00075 <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1ProphetBundleCore.html#67a65fc972b64f8cba3dd73e2edbe0a5" title="Virtual from prophet::BundleCore.">custody_accepted</a>() <span class="keyword">const</span>; <a name="l00076"></a>00076 <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1ProphetBundleCore.html#02bf8a64669d954187436f6d129a8715" title="Virtual from prophet::BundleCore.">drop_bundle</a>(<span class="keyword">const</span> <a class="code" href="classprophet_1_1Bundle.html" title="Facade interface between Prophet router and host implmentation&#39;s Bundle representation...">prophet::Bundle</a>* bundle); <a name="l00077"></a>00077 <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1ProphetBundleCore.html#533cbc680bb1c333fdac808b0de80476" title="Virtual from prophet::BundleCore.">send_bundle</a>(<span class="keyword">const</span> <a class="code" href="classprophet_1_1Bundle.html" title="Facade interface between Prophet router and host implmentation&#39;s Bundle representation...">prophet::Bundle</a>* bundle, <a name="l00078"></a>00078 <span class="keyword">const</span> <a class="code" href="classprophet_1_1Link.html">prophet::Link</a>* link); <a name="l00079"></a>00079 <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1ProphetBundleCore.html#1a8696244a7ce2d07a065b04787b6d8b" title="Virtual from prophet::BundleCore.">write_bundle</a>(<span class="keyword">const</span> <a class="code" href="classprophet_1_1Bundle.html" title="Facade interface between Prophet router and host implmentation&#39;s Bundle representation...">prophet::Bundle</a>* bundle, <a name="l00080"></a>00080 <span class="keyword">const</span> u_char* buffer, <a name="l00081"></a>00081 <span class="keywordtype">size_t</span> <a class="code" href="num2sdnv_8c.html#fed088663f8704004425cdae2120b9b3">len</a>); <a name="l00082"></a><a class="code" href="classdtn_1_1ProphetBundleCore.html#db5e1bc9d1959fb5a2bfce5fef463fc5">00082</a> <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1ProphetBundleCore.html#db5e1bc9d1959fb5a2bfce5fef463fc5" title="Virtual from prophet::BundleCore.">read_bundle</a>(<span class="keyword">const</span> <a class="code" href="classprophet_1_1Bundle.html" title="Facade interface between Prophet router and host implmentation&#39;s Bundle representation...">prophet::Bundle</a>* bundle, <a name="l00083"></a>00083 u_char* buffer, <a name="l00084"></a>00084 <span class="keywordtype">size_t</span>& len)<span class="keyword"> const</span> <a name="l00085"></a>00085 <span class="keyword"> </span>{ <a name="l00086"></a>00086 <span class="keywordflow">return</span> <span class="keyword">const_cast<</span><a class="code" href="classdtn_1_1ProphetBundleCore.html" title="Implements the prophet::BundleCore API by integrating DTN&#39;s system services.">ProphetBundleCore</a>*<span class="keyword">></span>(<span class="keyword">this</span>)-><a class="code" href="classdtn_1_1ProphetBundleCore.html#db5e1bc9d1959fb5a2bfce5fef463fc5" title="Virtual from prophet::BundleCore.">read_bundle</a>( <a name="l00087"></a>00087 bundle,buffer,len); <a name="l00088"></a>00088 } <a name="l00089"></a>00089 <a class="code" href="classprophet_1_1Bundle.html" title="Facade interface between Prophet router and host implmentation&#39;s Bundle representation...">prophet::Bundle</a>* <a class="code" href="classdtn_1_1ProphetBundleCore.html#f4d2996b411b94787d8df7654c1e4ecf" title="Virtual from prophet::BundleCore.">create_bundle</a>(<span class="keyword">const</span> std::string& <a class="code" href="dtnmoteproxy_8c.html#e1ade0f5a1b32f6c8be72f31a99e2a18">src</a>, <a name="l00090"></a>00090 <span class="keyword">const</span> std::string& dst, <a name="l00091"></a>00091 u_int <a class="code" href="dtncat_8c.html#d6057e40387509de502bdc91007d3238">expiration</a>); <a name="l00092"></a><a class="code" href="classdtn_1_1ProphetBundleCore.html#8977fbd7babe7accd434e8fa8426ce90">00092</a> <span class="keyword">const</span> <a class="code" href="classprophet_1_1BundleList.html" title="List of Prophet&#39;s Bundle facade objects.">prophet::BundleList</a>& <a class="code" href="classdtn_1_1ProphetBundleCore.html#8977fbd7babe7accd434e8fa8426ce90" title="Virtual from prophet::BundleCore.">bundles</a>()<span class="keyword"> const</span> <a name="l00093"></a>00093 <span class="keyword"> </span>{ <a name="l00094"></a>00094 <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1ProphetBundleCore.html#523fafcbef972e062ebe3c411dd7dc2f" title="objects that link DTN to Prophet bundles">bundles_</a>.<a class="code" href="classdtn_1_1ProphetBundleList.html#4898bcaa24d1c8c6615c9cac5f5c77c6" title="Return a const reference to BundleList, in no guaranteed order.">get_bundles</a>(); <a name="l00095"></a>00095 } <a name="l00096"></a>00096 <span class="keyword">const</span> <a class="code" href="classprophet_1_1Bundle.html" title="Facade interface between Prophet router and host implmentation&#39;s Bundle representation...">prophet::Bundle</a>* <a class="code" href="classdtn_1_1ProphetBundleCore.html#75d40cd7e91c7b5d8ca026f5a4943cf3" title="Virtual from prophet::BundleCore.">find</a>(<span class="keyword">const</span> <a class="code" href="classprophet_1_1BundleList.html" title="List of Prophet&#39;s Bundle facade objects.">prophet::BundleList</a>& list, <a name="l00097"></a>00097 <span class="keyword">const</span> std::string& eid, u_int32_t creation_ts, <a name="l00098"></a>00098 u_int32_t seqno) <span class="keyword">const</span>; <a name="l00099"></a>00099 <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1ProphetBundleCore.html#fbf59008d115bb77da64e173028e918c" title="Virtual from prophet::BundleCore.">update_node</a>(<span class="keyword">const</span> <a class="code" href="classprophet_1_1Node.html" title="Node represents a route to another Prophet node, and as such, tracks destination...">prophet::Node</a>* node); <a name="l00100"></a>00100 <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1ProphetBundleCore.html#73191dd5279e1298a7fbde2a54a61c13" title="Virtual from prophet::BundleCore.">delete_node</a>(<span class="keyword">const</span> <a class="code" href="classprophet_1_1Node.html" title="Node represents a route to another Prophet node, and as such, tracks destination...">prophet::Node</a>* node); <a name="l00101"></a><a class="code" href="classdtn_1_1ProphetBundleCore.html#91b31ede5c10693731653108fc46699d">00101</a> std::string <a class="code" href="classdtn_1_1ProphetBundleCore.html#91b31ede5c10693731653108fc46699d" title="Virtual from prophet::BundleCore.">local_eid</a>()<span class="keyword"> const</span> <a name="l00102"></a>00102 <span class="keyword"> </span>{ <a name="l00103"></a>00103 <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1ProphetBundleCore.html#0be0b5c1850550f664530dc4be5bcf87" title="route to local DTN instance">local_eid_</a>; <a name="l00104"></a>00104 } <a name="l00105"></a>00105 std::string <a class="code" href="classdtn_1_1ProphetBundleCore.html#4de78b6c6e8e99f23b0958c499c99378" title="Virtual from prophet::BundleCore.">prophet_id</a>(<span class="keyword">const</span> <a class="code" href="classprophet_1_1Link.html">prophet::Link</a>* link) <span class="keyword">const</span>; <a name="l00106"></a><a class="code" href="classdtn_1_1ProphetBundleCore.html#4de78b6c6e8e99f23b0958c499c99378">00106</a> std::string <a class="code" href="classdtn_1_1ProphetBundleCore.html#4de78b6c6e8e99f23b0958c499c99378" title="Virtual from prophet::BundleCore.">prophet_id</a>()<span class="keyword"> const</span> <a name="l00107"></a>00107 <span class="keyword"> </span>{ <a name="l00108"></a>00108 <a class="code" href="classdtn_1_1EndpointID.html">EndpointID</a> eid(<a class="code" href="classdtn_1_1ProphetBundleCore.html#3af8d47db2a95a24cae949a7ae182c88" title="Virtual from prophet::BundleCore.">get_route</a>(<a class="code" href="classdtn_1_1ProphetBundleCore.html#91b31ede5c10693731653108fc46699d" title="Virtual from prophet::BundleCore.">local_eid</a>())); <a name="l00109"></a>00109 eid.<a class="code" href="classdtn_1_1EndpointID.html#41d5be95b3068c4c2fa7a4b28f18ee8a" title="Append the specified service tag (in a scheme-specific manner) to the ssp.">append_service_tag</a>(<span class="stringliteral">"prophet"</span>); <a name="l00110"></a>00110 <span class="keywordflow">return</span> eid.<a class="code" href="classdtn_1_1EndpointID.html#e214dda88bf43a3576cfcdf76c77c5a9">str</a>(); <a name="l00111"></a>00111 } <a name="l00112"></a>00112 <a class="code" href="classprophet_1_1Alarm.html" title="Alarm registration.">prophet::Alarm</a>* <a class="code" href="classdtn_1_1ProphetBundleCore.html#49ab45f3e7d06f040f727edb815de465" title="Virtual from prophet::BundleCore.">create_alarm</a>(<a class="code" href="classprophet_1_1ExpirationHandler.html" title="Alarm expiration handler.">prophet::ExpirationHandler</a>* handler, <a name="l00113"></a>00113 u_int timeout, <span class="keywordtype">bool</span> jitter = <span class="keyword">false</span>); <a name="l00114"></a>00114 <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1ProphetBundleCore.html#ff15d52706f454338dc3b85b5e27af28" title="Virtual from prophet::BundleCore.">print_log</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">int</span> level, <span class="keyword">const</span> <span class="keywordtype">char</span>* fmt, ...) <a name="l00115"></a>00115 <a class="code" href="BundleCore_8h.html#f2200d91c2af569b1e7c99405045640e">PRINTFLIKE</a>(4,5); <a name="l00117"></a>00117 <a name="l00121"></a>00121 <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1ProphetBundleCore.html#db5e1bc9d1959fb5a2bfce5fef463fc5" title="Virtual from prophet::BundleCore.">read_bundle</a>(const prophet::<a class="code" href="classdtn_1_1Bundle.html" title="The internal representation of a bundle.">Bundle</a>* bundle, <a name="l00122"></a>00122 u_char* buffer, <a name="l00123"></a>00123 <span class="keywordtype">size_t</span>& len); <a name="l00124"></a>00124 <a name="l00129"></a>00129 <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1ProphetBundleCore.html#2f380429a5d36969d4522d02e4aa6e51" title="Initialization routine for deserializing routes from permanent storage.">load_prophet_nodes</a>(prophet::Table* nodes, <a name="l00130"></a>00130 prophet::ProphetParams* params); <a name="l00131"></a>00131 <a name="l00136"></a>00136 <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1ProphetBundleCore.html#8a5f42d5706c67c8874f8507a16c97e2" title="Initialization routine for loading Bundle metadata into Prophet&#39;s facade.">load_dtn_bundles</a>(const <a class="code" href="classdtn_1_1BundleList.html" title="List structure for handling bundles.">BundleList</a>* list); <a name="l00137"></a>00137 <a name="l00141"></a><a class="code" href="classdtn_1_1ProphetBundleCore.html#727fe40847cd264cec424bb5ef6d3161">00141</a> <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1ProphetBundleCore.html#727fe40847cd264cec424bb5ef6d3161" title="Callback for host system&#39;s shutdown routine.">shutdown</a>() <a name="l00142"></a>00142 { <a name="l00143"></a>00143 <a class="code" href="classdtn_1_1ProphetBundleCore.html#523fafcbef972e062ebe3c411dd7dc2f" title="objects that link DTN to Prophet bundles">bundles_</a>.<a class="code" href="classdtn_1_1ProphetBundleList.html#2b4739ca3d5359c9937384ccc551bfcc" title="Drop all prophet::Bundle*&#39;s from list.">clear</a>(); <a name="l00144"></a>00144 <a class="code" href="classdtn_1_1ProphetBundleCore.html#262a351626af35ced9e7604c9ef0134e" title="objects that link DTN to Prophet links">links_</a>.<a class="code" href="classdtn_1_1ProphetLinkList.html#0d70f2d7440006a0be394a0e3b8c6ea4" title="Remove all items from list and clean up memory.">clear</a>(); <a name="l00145"></a>00145 <a class="code" href="classdtn_1_1ProphetBundleCore.html#0d26612612b5c0d039316c72895bc4ec" title="interface into persistent storage">nodes_</a>.<a class="code" href="classdtn_1_1ProphetNodeList.html#2dad0fc20c9645013f92585c77e17b03" title="Clean up memory associated with this list (leaving permanent store untouched).">clear</a>(); <a name="l00146"></a>00146 } <a name="l00147"></a>00147 <a name="l00149"></a>00149 <span class="keyword">const</span> <a class="code" href="classdtn_1_1Bundle.html" title="The internal representation of a bundle.">Bundle</a>* <a class="code" href="classdtn_1_1ProphetBundleCore.html#996e6a15afca44ed35cb91bf1cab3c25" title="Conversion between Prophet&#39;s Facade type and DTN native type.">get_bundle</a>(<span class="keyword">const</span> <a class="code" href="classprophet_1_1Bundle.html" title="Facade interface between Prophet router and host implmentation&#39;s Bundle representation...">prophet::Bundle</a>* b); <a name="l00150"></a>00150 <span class="keyword">const</span> <a class="code" href="classprophet_1_1Bundle.html" title="Facade interface between Prophet router and host implmentation&#39;s Bundle representation...">prophet::Bundle</a>* <a class="code" href="classdtn_1_1ProphetBundleCore.html#996e6a15afca44ed35cb91bf1cab3c25" title="Conversion between Prophet&#39;s Facade type and DTN native type.">get_bundle</a>(<span class="keyword">const</span> <a class="code" href="classdtn_1_1Bundle.html" title="The internal representation of a bundle.">Bundle</a>* b); <a name="l00151"></a>00151 <span class="keyword">const</span> <a class="code" href="classprophet_1_1Bundle.html" title="Facade interface between Prophet router and host implmentation&#39;s Bundle representation...">prophet::Bundle</a>* <a class="code" href="classdtn_1_1ProphetBundleCore.html#df384080fdfc9cc99c8ed066f503fb5d" title="Conversion between Prophet&#39;s Facade type and DTN native type.">get_temp_bundle</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a>& b); <a name="l00152"></a>00152 <span class="keyword">const</span> <a class="code" href="classdtn_1_1Link.html" title="Abstraction for a DTN link, i.e.">Link</a>* <a class="code" href="classdtn_1_1ProphetBundleCore.html#d66e16db42a6bbe21ec71964ec73223e" title="Conversion between Prophet&#39;s Facade type and DTN native type.">get_link</a>(<span class="keyword">const</span> <a class="code" href="classprophet_1_1Link.html">prophet::Link</a>* link); <a name="l00153"></a>00153 <span class="keyword">const</span> <a class="code" href="classprophet_1_1Link.html">prophet::Link</a>* <a class="code" href="classdtn_1_1ProphetBundleCore.html#d66e16db42a6bbe21ec71964ec73223e" title="Conversion between Prophet&#39;s Facade type and DTN native type.">get_link</a>(<span class="keyword">const</span> <a class="code" href="classdtn_1_1Link.html" title="Abstraction for a DTN link, i.e.">Link</a>* link); <a name="l00155"></a>00155 <a name="l00158"></a>00158 <span class="keywordtype">void</span> <span class="keyword">add</span>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a>& b); <a name="l00159"></a>00159 <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1ProphetBundleCore.html#12409f4d4d0b3d4be1c756129f133379">del</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a>& b); <a name="l00160"></a>00160 <span class="keywordtype">void</span> <span class="keyword">add</span>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e" title="Typedef for a reference on a link.">LinkRef</a>& link); <a name="l00161"></a>00161 <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1ProphetBundleCore.html#12409f4d4d0b3d4be1c756129f133379">del</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e" title="Typedef for a reference on a link.">LinkRef</a>& link); <a name="l00163"></a>00163 <a name="l00167"></a><a class="code" href="classdtn_1_1ProphetBundleCore.html#8f9a2dec60515e216f5ba4b1fb584255">00167</a> <a class="code" href="classprophet_1_1Repository.html" title="Implements a modified heap-based priority_queue with bounds enforcement.">prophet::Repository</a>* <a class="code" href="classdtn_1_1ProphetBundleCore.html#8977fbd7babe7accd434e8fa8426ce90" title="Virtual from prophet::BundleCore.">bundles</a>() { <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1ProphetBundleCore.html#523fafcbef972e062ebe3c411dd7dc2f" title="objects that link DTN to Prophet bundles">bundles_</a>.<a class="code" href="classdtn_1_1ProphetBundleList.html#316344f5238c181e24cf16b9e211d997" title="Expose pointer to Bundle repository.">bundles</a>(); } <a name="l00168"></a>00168 <a name="l00169"></a>00169 <span class="keyword">protected</span>: <a name="l00170"></a><a class="code" href="classdtn_1_1ProphetBundleCore.html#166977848027ced069e3ce3591ac33ab">00170</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classdtn_1_1ProphetRouter.html">ProphetRouter</a>; <a name="l00171"></a>00171 <a name="l00172"></a><a class="code" href="classdtn_1_1ProphetBundleCore.html#28247942ac5a5db76cdd32353370169d">00172</a> <a class="code" href="classdtn_1_1BundleActions.html" title="Intermediary class that provides a utility interface to help routers more easily...">BundleActions</a>* <span class="keyword">const</span> <a class="code" href="classdtn_1_1ProphetBundleCore.html#28247942ac5a5db76cdd32353370169d" title="actions interface for send, delete, etc">actions_</a>; <a name="l00173"></a><a class="code" href="classdtn_1_1ProphetBundleCore.html#523fafcbef972e062ebe3c411dd7dc2f">00173</a> <a class="code" href="classdtn_1_1ProphetBundleList.html" title="Maintain mapping between dtn::Bundle and prophet::Bundle.">ProphetBundleList</a> <a class="code" href="classdtn_1_1ProphetBundleCore.html#523fafcbef972e062ebe3c411dd7dc2f" title="objects that link DTN to Prophet bundles">bundles_</a>; <a name="l00174"></a><a class="code" href="classdtn_1_1ProphetBundleCore.html#262a351626af35ced9e7604c9ef0134e">00174</a> <a class="code" href="classdtn_1_1ProphetLinkList.html">ProphetLinkList</a> <a class="code" href="classdtn_1_1ProphetBundleCore.html#262a351626af35ced9e7604c9ef0134e" title="objects that link DTN to Prophet links">links_</a>; <a name="l00175"></a><a class="code" href="classdtn_1_1ProphetBundleCore.html#0d26612612b5c0d039316c72895bc4ec">00175</a> <a class="code" href="classdtn_1_1ProphetNodeList.html" title="Maintain a one-to-one mapping of objects in memory to objects in permanent store...">ProphetNodeList</a> <a class="code" href="classdtn_1_1ProphetBundleCore.html#0d26612612b5c0d039316c72895bc4ec" title="interface into persistent storage">nodes_</a>; <a name="l00176"></a><a class="code" href="classdtn_1_1ProphetBundleCore.html#0be0b5c1850550f664530dc4be5bcf87">00176</a> <span class="keyword">const</span> std::string <a class="code" href="classdtn_1_1ProphetBundleCore.html#0be0b5c1850550f664530dc4be5bcf87" title="route to local DTN instance">local_eid_</a>; <a name="l00177"></a><a class="code" href="classdtn_1_1ProphetBundleCore.html#951ac6cc1edc0202298a9b242593d949">00177</a> oasys::SpinLock* <span class="keyword">const</span> <a class="code" href="classdtn_1_1ProphetBundleCore.html#951ac6cc1edc0202298a9b242593d949" title="shared lock with ProphetRouter">lock_</a>; <a name="l00178"></a><a class="code" href="classdtn_1_1ProphetBundleCore.html#af452604d6bdefe329fe72626276df95">00178</a> <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1ProphetBundleCore.html#af452604d6bdefe329fe72626276df95" title="test constructor used, meaning that BundleDaemon is unavailable">test_mode_</a>; <a name="l00179"></a>00179 <a name="l00180"></a>00180 <a name="l00181"></a>00181 }; <span class="comment">// class ProphetBundleCore</span> <a name="l00182"></a>00182 <a name="l00183"></a>00183 }; <span class="comment">// namespace dtn</span> <a name="l00184"></a>00184 <a name="l00185"></a>00185 <span class="preprocessor">#endif // _PROPHET_BUNDLE_CORE_H_</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Mon Jul 21 14:09:46 2008 for DTN Reference Implementation by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> </body> </html>