00001 /* 00002 * Copyright 2006 Baylor University 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 #ifndef _PROPHET_ROUTER_H_ 00018 #define _PROPHET_ROUTER_H_ 00019 00020 #include "ProphetController.h" 00021 #include "bundling/BundleList.h" 00022 #include "reg/AdminRegistration.h" 00023 00024 namespace dtn { 00025 00026 class ProphetRouter : public BundleRouter { 00027 public: 00028 ProphetRouter(); 00029 virtual ~ProphetRouter(); 00030 00034 void initialize(); 00035 00041 void handle_event(BundleEvent*); 00042 00046 void get_routing_state(oasys::StringBuffer*); 00047 00051 void handle_bundle_received(BundleReceivedEvent*); 00052 00056 void handle_bundle_delivered(BundleReceivedEvent*); 00057 00061 void handle_bundle_expired(BundleExpiredEvent*); 00062 00066 void handle_link_created(LinkCreatedEvent* event); 00067 00071 void handle_contact_up(ContactUpEvent* ); 00072 00076 void handle_contact_down(ContactDownEvent* ); 00077 00081 void handle_link_state_change_request(LinkStateChangeRequest*); 00082 00087 static ProphetParams params_; 00088 00089 protected: 00090 ProphetController* oracle_; 00091 00092 }; // ProphetRouter 00093 00094 } // namespace dtn 00095 00096 #endif /* _PROPHET_ROUTER_H_ */