# $Id: CosNaming.pm 1354 2006-06-14 00:27:26Z rvosa $ # Subversion: $Rev: 117 $ use COPE::CosNaming_types; use COPE::CORBA::Object; use Log::Log4perl; use COPE::CORBA::ORB; Log::Log4perl::init( COPE::CORBA::ORB->LOGPERLCONF ); # interface CosNaming::NamingContext (IDL:omg.org/CosNaming/NamingContext:1.0) package CosNaming::NamingContext; my $logger = Log::Log4perl::get_logger('CosNaming.NamingContext'); # operation bind (IDL:omg.org/CosNaming/NamingContext/bind:1.0) sub bind { $logger->info("Binding"); my ( $self, $n, $obj ) = @_; my $result_ = { _type => $CORBA::_tc_void }; my $request_ = $self->create_request( 'operation' => 'bind', 'arg_list' => [ { 'argument' => { '_type' => $CosNaming::Name::_tc, '_value' => $n }, 'arg_modes' => 0, }, { 'argument' => { '_type' => $CORBA::Object::_tc, '_value' => $obj }, 'arg_modes' => 0, }, ], 'result' => $result_ ); $request_->invoke(0); } # operation rebind (IDL:omg.org/CosNaming/NamingContext/rebind:1.0) sub rebind { $logger->info("Rebinding"); my ( $self, $n, $obj ) = @_; my $result_ = { '_type' => $CORBA::_tc_void }; my $request_ = $self->create_request( 'operation' => 'rebind', 'arg_list' => [ { 'argument' => { '_type' => $CosNaming::Name::_tc, '_value' => $n }, 'arg_modes' => 0, }, { 'argument' => { '_type' => $CORBA::Object::_tc, '_value' => $obj }, 'arg_modes' => 0, }, ], 'result' => $result_ ); $request_->invoke(0); } # operation bind_context (IDL:omg.org/CosNaming/NamingContext/bind_context:1.0) sub bind_context { $logger->info("Binding context"); my ( $self, $n, $nc ) = @_; my $result_ = { _type => $CORBA::_tc_void }; my $request_ = $self->create_request( 'operation' => 'bind_context', 'arg_list' => [ { 'argument' => { '_type' => $CosNaming::Name::_tc, '_value' => $n }, 'arg_modes' => 0, }, { 'argument' => { '_type' => $CosNaming::NamingContext::_tc, '_value' => $nc }, 'arg_modes' => 0, }, ], 'result' => $result_ ); $request_->invoke(0); } # operation rebind_context (IDL:omg.org/CosNaming/NamingContext/rebind_context:1.0) sub rebind_context { $logger->info("Rebinding context"); my ( $self, $n, $nc ) = @_; my $result_ = { _type => $CORBA::_tc_void }; my $request_ = $self->create_request( 'operation' => 'rebind_context', 'arg_list' => [ { 'argument' => { '_type' => $CosNaming::Name::_tc, '_value' => $n }, 'arg_modes' => 0, }, { 'argument' => { '_type' => $CosNaming::NamingContext::_tc, '_value' => $nc }, 'arg_modes' => 0, }, ], 'result' => $result_ ); $request_->invoke(0); } # operation resolve (IDL:omg.org/CosNaming/NamingContext/resolve:1.0) sub resolve { $logger->info("Resolving"); my ( $self, $n ) = @_; my $result_ = { '_type' => $CORBA::Object::_tc }; my $request_ = $self->create_request( 'operation' => 'resolve', 'arg_list' => [ { 'argument' => { '_type' => $CosNaming::Name::_tc, '_value' => $n }, 'arg_modes' => 0, }, ], 'result' => $result_ ); $request_->invoke(0); return $result_->{'_value'}; } # operation unbind (IDL:omg.org/CosNaming/NamingContext/unbind:1.0) sub unbind { $logger->info("Unbinding"); my ( $self, $n ) = @_; my $result_ = { '_type' => $CORBA::_tc_void }; my $request_ = $self->create_request( 'operation' => 'unbind', 'arg_list' => [ { 'argument' => { '_type' => $CosNaming::Name::_tc, '_value' => $n }, 'arg_modes' => 0, }, ], 'result' => $result_ ); $request_->invoke(0); } # operation new_context (IDL:omg.org/CosNaming/NamingContext/new_context:1.0) sub new_context { $logger->info("Creating new context"); my ($self) = @_; my $result_ = { '_type' => $CosNaming::NamingContext::_tc }; my $request_ = $self->create_request( 'operation' => 'new_context', 'arg_list' => [], 'result' => $result_ ); $request_->invoke(0); return $result_->{'_value'}; } # operation bind_new_context (IDL:omg.org/CosNaming/NamingContext/bind_new_context:1.0) sub bind_new_context { $logger->info("Binding new context"); my ( $self, $n ) = @_; my $result_ = { '_type' => $CosNaming::NamingContext::_tc }; my $request_ = $self->create_request( 'operation' => 'bind_new_context', 'arg_list' => [ { 'argument' => { '_type' => $CosNaming::Name::_tc, '_value' => $n }, 'arg_modes' => 0, }, ], 'result' => $result_ ); $request_->invoke(0); return $result_->{'_value'}; } # operation destroy (IDL:omg.org/CosNaming/NamingContext/destroy:1.0) sub destroy { $logger->info("Destroying"); my ($self) = @_; my $result_ = { '_type' => $CORBA::_tc_void }; my $request_ = $self->create_request( 'operation' => 'destroy', 'arg_list' => [], 'result' => $result_ ); $request_->invoke(0); } # operation list (IDL:omg.org/CosNaming/NamingContext/list:1.0) sub list { $logger->info("Listing"); my ( $self, $how_many, $bl, $bi ) = @_; my $result_ = { '_type' => $CORBA::_tc_void }; my $request_ = $self->create_request( 'operation' => 'list', 'arg_list' => [ { 'argument' => { '_type' => $CORBA::_tc_ulong, '_value' => $how_many }, 'arg_modes' => 0, }, { 'argument' => { '_type' => $CosNaming::BindingList::_tc, '_value' => $bl }, 'arg_modes' => 1, }, { 'argument' => { '_type' => CORBA::TypeCode::_create_interface_tc( 'IDL:omg.org/CosNaming/BindingIterator:1.0', 'BindingIterator' ), '_value' => $bi }, 'arg_modes' => 1, }, ], 'result' => $result_ ); $request_->invoke(0); } 1; # interface CosNaming::BindingIterator (IDL:omg.org/CosNaming/BindingIterator:1.0) package CosNaming::BindingIterator; $logger = Log::Log4perl::get_logger('CosNaming.BindingIterator'); # operation next_one (IDL:omg.org/CosNaming/BindingIterator/next_one:1.0) sub next_one { $logger->info("Retrieving next binding"); my ( $self, $b ) = @_; my $result_ = { '_type' => $CORBA::_tc_boolean }; my $request_ = $self->create_request( 'operation' => 'next_one', 'arg_list' => [ { 'argument' => { '_type' => $CosNaming::Binding::_tc, '_value' => $b }, 'arg_modes' => 1, }, ], 'result' => $result_ ); $request_->invoke(0); return $result_->{'_value'}; } # operation next_n (IDL:omg.org/CosNaming/BindingIterator/next_n:1.0) sub next_n { $logger->info("Retrieving next n bindings"); my ( $self, $how_many, $bl ) = @_; my $result_ = { _type => $CORBA::_tc_boolean }; my $request_ = $self->create_request( 'operation' => 'next_n', 'arg_list' => [ { 'argument' => { '_type' => $CORBA::_tc_ulong, '_value' => $how_many }, 'arg_modes' => 0, }, { 'argument' => { '_type' => $CosNaming::BindingList::_tc, '_value' => $bl }, 'arg_modes' => 1, }, ], 'result' => $result_ ); $request_->invoke(0); return $result_->{'_value'}; } # operation destroy (IDL:omg.org/CosNaming/BindingIterator/destroy:1.0) sub destroy { $logger->info("Destroying"); my ($self) = @_; my $result_ = { _type => $CORBA::_tc_void }; my $request_ = $self->create_request( 'operation' => 'destroy', 'arg_list' => [], 'result' => $result_ ); $request_->invoke(0); } 1; __END__ =head1 NAME CosNaming::BindingIterator A class to ... =head1 SYNOPSIS use CosNaming::BindingIterator; =head1 DESCRIPTION The CosNaming::BindingIterator class implements ... =head1 OPTIONS -D - show debugging information -h - show help -v - show version Other options ... =head1 SUBROUTINES =head2 bind (method) Parameters: n obj Insert description of method here... =head2 rebind (method) Parameters: n obj Insert description of method here... =head2 bind_context (method) Parameters: n nc Insert description of method here... =head2 rebind_context (method) Parameters: n nc Insert description of method here... =head2 resolve (method) Parameters: n Insert description of method here... =head2 unbind (method) Parameters: n Insert description of method here... =head2 new_context (method) Parameters: none Insert description of method here... =head2 bind_new_context (method) Parameters: n Insert description of method here... =head2 destroy (method) Parameters: none Insert description of method here... =head2 list (method) Parameters: how_many bl bi Insert description of method here... =head2 next_one (method) Parameters: b Insert description of method here... =head2 next_n (method) Parameters: how_many bl Insert description of method here... =head2 destroy (method) Parameters: none Insert description of method here... =head1 FILES Files used by the CosNaming::BindingIterator class ... =head1 SEE ALSO Related information ... =head1 WARNINGS ... =head1 NOTES ... =head1 BUGS What? =cut