Changeset 2473 for source/ariba/interface
- Timestamp:
- Feb 23, 2009, 2:21:49 PM (16 years ago)
- Location:
- source/ariba/interface
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/interface/ServiceInterface.cpp
r2472 r2473 38 38 39 39 #include "ServiceInterface.h" 40 #include "ariba/interface/AribaContext.h"41 40 42 41 namespace ariba { 43 42 namespace interface { 44 43 45 ServiceInterface::ServiceInterface() : overlay( NULL ){44 ServiceInterface::ServiceInterface() { 46 45 } 47 46 48 47 ServiceInterface::~ServiceInterface(){ 49 if( overlay != NULL )50 overlay->unbind( this, serviceid );51 }52 53 bool ServiceInterface::initialize( AribaContext* _ctx, const ServiceID& _serviceid ){54 return initialize( &_ctx->getOverlay(), _serviceid );55 }56 57 bool ServiceInterface::initialize( BaseOverlay* _overlay, const ServiceID& _serviceid ){58 if( _overlay == NULL ) return false;59 60 overlay = _overlay;61 serviceid = _serviceid;62 63 return overlay->bind( this, serviceid);64 48 } 65 49 -
source/ariba/interface/ServiceInterface.h
r2472 r2473 67 67 namespace interface { 68 68 69 class AribaContext;70 71 69 class ServiceInterface : public OverlayEvents, MessageReceiver { 72 70 friend class ariba::overlay::BaseOverlay; … … 74 72 ServiceInterface(); 75 73 virtual ~ServiceInterface(); 76 77 bool initialize( AribaContext* _ctx, const ServiceID& _serviceid );78 bool initialize( BaseOverlay* _overlay, const ServiceID& _serviceid );79 74 80 75 protected: … … 96 91 97 92 virtual bool receiveMessage( const Message* message, const LinkID& link, const NodeID& node ); 98 99 private:100 BaseOverlay* overlay;101 ServiceID serviceid;102 93 }; 103 94 -
source/ariba/interface/UnderlayAbstraction.cpp
r2472 r2473 86 86 } 87 87 88 void UnderlayAbstraction::destroySpoVNet(AribaContext* ctx) {89 ctx->getOverlay().leaveSpoVNet();90 delete &ctx->getOverlay();91 delete &ctx->getBaseCommunication();92 delete ctx;93 }94 95 88 AribaContext* UnderlayAbstraction::joinSpoVNet(const SpoVNetID& spovnetid, const EndpointDescriptor& bootstrapnode, const NodeID& nodeid, const NetworkLocator* locallocator, const uint16_t localport) { 96 89 … … 107 100 108 101 void UnderlayAbstraction::leaveSpoVNet(AribaContext* ctx) { 109 destroySpoVNet( ctx ); 102 ctx->getOverlay().leaveSpoVNet(); 103 delete &ctx->getOverlay(); 104 delete &ctx->getBaseCommunication(); 105 delete ctx; 110 106 } 111 107 -
source/ariba/interface/UnderlayAbstraction.h
r2472 r2473 79 79 ); 80 80 81 void destroySpoVNet( AribaContext* ctx );82 83 81 AribaContext* joinSpoVNet( 84 82 const SpoVNetID& spovnetid,
Note:
See TracChangeset
for help on using the changeset viewer.