# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright 2020 Raritan Inc. All rights reserved.
#
# This file was generated by IdlC from TfwEventService.idl.

use strict;

package Raritan::RPC::tfw::EventService;

use parent qw(Raritan::RPC::RemoteObject);

use constant typeId => "tfw.EventService:1.0.0";

sub new {
    my ($class, $agent, $rid, $typeId) = @_;
    $typeId = $typeId || Raritan::RPC::tfw::EventService::typeId;
    return $class->SUPER::new($agent, $rid, $typeId);
}


sub createChannel($) {
    my ($self) = @_;
    my $agent = $self->{'agent'};
    my $args = {};
    my $rsp = $agent->json_rpc($self->{'rid'}, 'createChannel', $args);
    my $_ret_;
    $_ret_ = Raritan::RPC::ObjectCodec::decode($agent, $rsp->{'_ret_'}, 'tfw.EventChannel');
    return $_ret_;
}


sub destroyChannel($$) {
    my ($self, $channel) = @_;
    my $agent = $self->{'agent'};
    my $args = {};
    $args->{'channel'} = Raritan::RPC::ObjectCodec::encode($channel);
    my $rsp = $agent->json_rpc($self->{'rid'}, 'destroyChannel', $args);
}

Raritan::RPC::Registry::registerProxyClass('tfw.EventService', 1, 0, 0, 'Raritan::RPC::tfw::EventService');
1;
