our $in_request = 0;
our @pending_requests;
+sub package {
+ my $self = shift;
+ return $self->{api_name};
+}
+
sub api_name {
my $self = shift;
return $self->{api_name};
}
+sub api_level {
+ my $self = shift;
+ return $self->{api_name};
+}
+
sub server_class {
my $class = shift;
if($class) {
return 1;
}
+sub is_registered {
+ my $self = shift;
+ my $api_name = shift;
+ my $api_level = shift || 1;
+ return exists($_METHODS[$api_level]{$api_name});
+}
+
sub register_method {
my $self = shift;
my $app = ref($self) || $self;
my $no_remote = shift || 0;
# this instead of " || 1;" above to allow api_level 0
- $proto = 1 unless (defined $proto);
+ $proto = $self->api_level unless (defined $proto);
my $class = ref($self) || $self;