1e1051a39Sopenharmony_ci# Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
2e1051a39Sopenharmony_ci#
3e1051a39Sopenharmony_ci# Licensed under the Apache License 2.0 (the "License").  You may not use
4e1051a39Sopenharmony_ci# this file except in compliance with the License.  You can obtain a copy
5e1051a39Sopenharmony_ci# in the file LICENSE in the source distribution or at
6e1051a39Sopenharmony_ci# https://www.openssl.org/source/license.html
7e1051a39Sopenharmony_ci
8e1051a39Sopenharmony_ciuse strict;
9e1051a39Sopenharmony_ci
10e1051a39Sopenharmony_cipackage TLSProxy::Alert;
11e1051a39Sopenharmony_ci
12e1051a39Sopenharmony_cisub new
13e1051a39Sopenharmony_ci{
14e1051a39Sopenharmony_ci    my $class = shift;
15e1051a39Sopenharmony_ci    my ($server,
16e1051a39Sopenharmony_ci        $encrypted,
17e1051a39Sopenharmony_ci        $level,
18e1051a39Sopenharmony_ci        $description) = @_;
19e1051a39Sopenharmony_ci
20e1051a39Sopenharmony_ci    my $self = {
21e1051a39Sopenharmony_ci        server => $server,
22e1051a39Sopenharmony_ci        encrypted => $encrypted,
23e1051a39Sopenharmony_ci        level => $level,
24e1051a39Sopenharmony_ci        description => $description
25e1051a39Sopenharmony_ci    };
26e1051a39Sopenharmony_ci
27e1051a39Sopenharmony_ci    return bless $self, $class;
28e1051a39Sopenharmony_ci}
29e1051a39Sopenharmony_ci
30e1051a39Sopenharmony_ci#Read only accessors
31e1051a39Sopenharmony_cisub server
32e1051a39Sopenharmony_ci{
33e1051a39Sopenharmony_ci    my $self = shift;
34e1051a39Sopenharmony_ci    return $self->{server};
35e1051a39Sopenharmony_ci}
36e1051a39Sopenharmony_cisub encrypted
37e1051a39Sopenharmony_ci{
38e1051a39Sopenharmony_ci    my $self = shift;
39e1051a39Sopenharmony_ci    return $self->{encrypted};
40e1051a39Sopenharmony_ci}
41e1051a39Sopenharmony_cisub level
42e1051a39Sopenharmony_ci{
43e1051a39Sopenharmony_ci    my $self = shift;
44e1051a39Sopenharmony_ci    return $self->{level};
45e1051a39Sopenharmony_ci}
46e1051a39Sopenharmony_cisub description
47e1051a39Sopenharmony_ci{
48e1051a39Sopenharmony_ci    my $self = shift;
49e1051a39Sopenharmony_ci    return $self->{description};
50e1051a39Sopenharmony_ci}
51e1051a39Sopenharmony_ci1;
52