# $Id: ServerRequest.pm 1354 2006-06-14 00:27:26Z rvosa $ # Subversion: $Rev: 117 $ # Copyright (c) 1997 Lunatech Research / Bart Schuller # See the file "Artistic" in the distribution for licensing and # (lack of) warranties. # interface ServerRequest use Log::Log4perl; use COPE::CORBA::ORB; Log::Log4perl::init( COPE::CORBA::ORB->LOGPERLCONF ); package CORBA::ServerRequest; my $logger = Log::Log4perl::get_logger('CORBA.ServerRequest'); =pod =begin testing ok( CORBA::ServerRequest->new, "Testing \"CORBA::ServerRequest\" constructor" ); =end testing =cut sub new { $logger->info("Creating \"CORBA::ServerRequest\" object"); my ( $class, $operation, $byte_order, $data, $index ) = @_; my $self = { 'operation' => $operation, 'byte_order' => $byte_order, 'data' => $data, 'data_index' => $index, }; return bless $self, $class; } =pod =begin testing ok( CORBA::ServerRequest->new->params, "Testing \"CORBA::ServerRequest\" params method" ); =end testing =cut sub params { $logger->info("Appending params to server request"); my ( $self, $arg_list ) = @_; $self->{'arg_list'} = $arg_list; my $index = $self->{'data_index'}; for my $arg (@$arg_list) { if ( ( $arg->{'arg_modes'} == 0 ) || ( $arg->{'arg_modes'} == 2 ) ) { $arg->{'argument'}{'_value'} = CORBA::ORB::_unmarshal_using_tc( \$self->{'data'}, \$index, $self->{'byte_order'}, $arg->{'argument'}{'_type'} ); } } } =pod =begin testing ok( CORBA::ServerRequest->new->result, "Testing \"CORBA::ServerRequest\" result method" ); =end testing =cut sub result { $logger->info("Appending result to server request"); my ( $self, $result ) = @_; $self->{'result'} = $result; } =pod =begin testing ok( CORBA::ServerRequest->new->op_name, "Testing \"CORBA::ServerRequest\" op_name method" ); =end testing =cut sub op_name { $logger->info("Returning op_name"); my ($self) = @_; return $self->{'operation'}; } =pod =begin testing ok( CORBA::ServerRequest->new->get_arglist, "Testing \"CORBA::ServerRequest\" get_arglist method" ); =end testing =cut # not in interface sub get_arglist { $logger->info("Returning arg list"); my ($self) = @_; return $self->{'arg_list'}; } =pod =begin testing ok( CORBA::ServerRequest->new->get_result, "Testing \"CORBA::ServerRequest\" get_result method" ); =end testing =cut sub get_result { $logger->info("Returning result"); my ($self) = @_; return $self->{'result'}; } 1; __END__ =head1 NAME CORBA::ServerRequest A class to ... =head1 SYNOPSIS use CORBA::ServerRequest; =head1 DESCRIPTION The CORBA::ServerRequest class implements ... =head1 OPTIONS -D - show debugging information -h - show help -v - show version Other options ... =head1 SUBROUTINES =head2 new (constructor) Parameters: class operation byte_order data index Insert description of constructor here... =head2 params (method) Parameters: arg_list Insert description of method here... =head2 result (method) Parameters: result Insert description of method here... =head2 op_name (method) Parameters: none Insert description of method here... =head2 get_arglist (method) Parameters: none Insert description of method here... =head2 get_result (method) Parameters: none Insert description of method here... =head1 FILES Files used by the CORBA::ServerRequest class ... =head1 SEE ALSO Related information ... =head1 WARNINGS ... =head1 NOTES ... =head1 BUGS What? =cut