// This C++ header file was generated by the TTCN-3 compiler
// of the TTCN-3 Test Executor version 9.0.0
// The generation of user and time information were disabled by the -D flag.

// Copyright (c) 2000-2023 Ericsson Telecom AB

// Do not edit this file unless you know what you are doing.

#ifndef TCCInterface__Functions_HH
#define TCCInterface__Functions_HH

#ifdef TITAN_RUNTIME_2
#error Generated code does not match with used runtime.\
 Code was generated without -R option but -DTITAN_RUNTIME_2 was used.
#endif

/* Header file includes */

#include <TTCN3.hh>
#include "TCCConversion_Functions.hh"

#if TTCN3_VERSION != 90000
#error Version mismatch detected.\
 Please check the version of the TTCN-3 compiler and the base library.\
 Run make clean and rebuild the project if the version of the compiler changed recently.
#endif

#ifndef LINUX
#error This file should be compiled on LINUX
#endif

#undef TCCInterface__Functions_HH
#endif

namespace TCCInterface__Functions {

/* Forward declarations of classes */

typedef PreGenRecordOf::PREGEN__RECORD__OF__CHARSTRING CharstringList;
typedef PreGenRecordOf::PREGEN__RECORD__OF__CHARSTRING_template CharstringList_template;
class IPAddresses;
class IPAddresses_template;
class TCCInterface__IPAddressType;
class TCCInterface__IPAddressType_template;
class TCCInterface__ProtocolType;
class TCCInterface__ProtocolType_template;
class TCCInterface__PortStatus;
class TCCInterface__PortStatus_template;

} /* end of namespace */

#ifndef TCCInterface__Functions_HH
#define TCCInterface__Functions_HH

namespace TCCInterface__Functions {

/* Class definitions */

class IPAddresses {
  CharstringList field_ipv4List;
  CharstringList field_ipv6List;
public:
  IPAddresses();
  IPAddresses(const CharstringList& par_ipv4List,
    const CharstringList& par_ipv6List);
  IPAddresses(const IPAddresses& other_value);
  inline boolean is_component() { return FALSE; }
  void clean_up();
const TTCN_Typedescriptor_t* get_descriptor() const;
  IPAddresses& operator=(const IPAddresses& other_value);
  boolean operator==(const IPAddresses& other_value) const;
  inline boolean operator!=(const IPAddresses& other_value) const
    { return !(*this == other_value); }

  boolean is_bound() const;

inline boolean is_present() const { return is_bound(); }
  boolean is_value() const;

  inline CharstringList& ipv4List()
    {return field_ipv4List;}
  inline const CharstringList& ipv4List() const
    {return field_ipv4List;}
  inline CharstringList& ipv6List()
    {return field_ipv6List;}
  inline const CharstringList& ipv6List() const
    {return field_ipv6List;}
  inline int size_of() const
    {return 2;}
  void log() const;
  void set_implicit_omit();
  void set_param(Module_Param& param);
  void encode_text(Text_Buf& text_buf) const;
  void decode_text(Text_Buf& text_buf);
};

class IPAddresses_template : public Base_Template {
struct single_value_struct;
union {
single_value_struct *single_value;
struct {
unsigned int n_values;
IPAddresses_template *list_value;
} value_list;
struct {
IPAddresses_template* precondition;
IPAddresses_template* implied_template;
} implication_;
dynmatch_struct<IPAddresses>* dyn_match;
};

void set_specific();
void copy_value(const IPAddresses& other_value);
void copy_template(const IPAddresses_template& other_value);

public:
IPAddresses_template();
IPAddresses_template(template_sel other_value);
IPAddresses_template(const IPAddresses& other_value);
IPAddresses_template(const OPTIONAL<IPAddresses>& other_value);
IPAddresses_template(IPAddresses_template* p_precondition, IPAddresses_template* p_implied_template);
IPAddresses_template(Dynamic_Match_Interface<IPAddresses>* p_dyn_match);
IPAddresses_template(const IPAddresses_template& other_value);
~IPAddresses_template();
IPAddresses_template& operator=(template_sel other_value);
IPAddresses_template& operator=(const IPAddresses& other_value);
IPAddresses_template& operator=(const OPTIONAL<IPAddresses>& other_value);
IPAddresses_template& operator=(const IPAddresses_template& other_value);
boolean match(const IPAddresses& other_value, boolean legacy = FALSE) const;
boolean is_bound() const;
boolean is_value() const;
void clean_up();
IPAddresses valueof() const;
void set_type(template_sel template_type, unsigned int list_length);
IPAddresses_template& list_item(unsigned int list_index) const;
CharstringList_template& ipv4List();
const CharstringList_template& ipv4List() const;
CharstringList_template& ipv6List();
const CharstringList_template& ipv6List() const;
int size_of() const;
void log() const;
void log_match(const IPAddresses& match_value, boolean legacy = FALSE) const;
void encode_text(Text_Buf& text_buf) const;
void decode_text(Text_Buf& text_buf);
void set_param(Module_Param& param);
void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
boolean is_present(boolean legacy = FALSE) const;
boolean match_omit(boolean legacy = FALSE) const;
};

class TCCInterface__IPAddressType : public Base_Type { // enum
friend class TCCInterface__IPAddressType_template;
public:
enum enum_type { IPv4 = 0, IPv6 = 1, UNKNOWN = 2, UNKNOWN_VALUE = 3, UNBOUND_VALUE = 4 };
private:
enum_type enum_value;

public:
TCCInterface__IPAddressType();
TCCInterface__IPAddressType(int other_value);
TCCInterface__IPAddressType(enum_type other_value);
TCCInterface__IPAddressType(const TCCInterface__IPAddressType& other_value);

TCCInterface__IPAddressType& operator=(int other_value);
TCCInterface__IPAddressType& operator=(enum_type other_value);
TCCInterface__IPAddressType& operator=(const TCCInterface__IPAddressType& other_value);

boolean operator==(enum_type other_value) const;
boolean operator==(const TCCInterface__IPAddressType& other_value) const;
inline boolean operator!=(enum_type other_value) const { return !(*this == other_value); }
inline boolean operator!=(const TCCInterface__IPAddressType& other_value) const { return !(*this == other_value); }
boolean operator<(enum_type other_value) const;
boolean operator<(const TCCInterface__IPAddressType& other_value) const;
boolean operator>(enum_type other_value) const;
boolean operator>(const TCCInterface__IPAddressType& other_value) const;
inline boolean operator<=(enum_type other_value) const { return !(*this > other_value); }
inline boolean operator<=(const TCCInterface__IPAddressType& other_value) const { return !(*this > other_value); }
inline boolean operator>=(enum_type other_value) const { return !(*this < other_value); }
inline boolean operator>=(const TCCInterface__IPAddressType& other_value) const { return !(*this < other_value); }

static const char *enum_to_str(enum_type enum_par);
static enum_type str_to_enum(const char *str_par);
static boolean is_valid_enum(int int_par);

static int enum2int(enum_type enum_par);
static int enum2int(const TCCInterface__IPAddressType& enum_par);
int as_int() const { return enum2int(enum_value); }
void from_int(int p_val) { *this = p_val; }
void int2enum(int int_val);
operator enum_type() const;
inline boolean is_bound() const { return enum_value != UNBOUND_VALUE; }
inline boolean is_value() const { return enum_value != UNBOUND_VALUE; }
inline void clean_up(){ enum_value = UNBOUND_VALUE; }
inline boolean is_present() const { return is_bound(); }
void log() const;
void set_param(Module_Param& param);
void encode_text(Text_Buf& text_buf) const;
void decode_text(Text_Buf& text_buf);
};

class TCCInterface__IPAddressType_template : public Base_Template {
union {
TCCInterface__IPAddressType::enum_type single_value;
struct {
unsigned int n_values;
TCCInterface__IPAddressType_template *list_value;
} value_list;
struct {
TCCInterface__IPAddressType_template* precondition;
TCCInterface__IPAddressType_template* implied_template;
} implication_;
dynmatch_struct<TCCInterface__IPAddressType>* dyn_match;
};

void copy_template(const TCCInterface__IPAddressType_template& other_value);

public:
TCCInterface__IPAddressType_template();
TCCInterface__IPAddressType_template(template_sel other_value);
TCCInterface__IPAddressType_template(int other_value);
TCCInterface__IPAddressType_template(TCCInterface__IPAddressType::enum_type other_value);
TCCInterface__IPAddressType_template(const TCCInterface__IPAddressType& other_value);
TCCInterface__IPAddressType_template(const OPTIONAL<TCCInterface__IPAddressType>& other_value);
TCCInterface__IPAddressType_template(TCCInterface__IPAddressType_template* p_precondition, TCCInterface__IPAddressType_template* p_implied_template);
TCCInterface__IPAddressType_template(Dynamic_Match_Interface<TCCInterface__IPAddressType>* p_dyn_match);
TCCInterface__IPAddressType_template(const TCCInterface__IPAddressType_template& other_value);
~TCCInterface__IPAddressType_template();

boolean is_bound() const;
boolean is_value() const;
void clean_up();
TCCInterface__IPAddressType_template& operator=(template_sel other_value);
TCCInterface__IPAddressType_template& operator=(int other_value);
TCCInterface__IPAddressType_template& operator=(TCCInterface__IPAddressType::enum_type other_value);
TCCInterface__IPAddressType_template& operator=(const TCCInterface__IPAddressType& other_value);
TCCInterface__IPAddressType_template& operator=(const OPTIONAL<TCCInterface__IPAddressType>& other_value);
TCCInterface__IPAddressType_template& operator=(const TCCInterface__IPAddressType_template& other_value);

boolean match(TCCInterface__IPAddressType::enum_type other_value, boolean legacy = FALSE) const;
boolean match(const TCCInterface__IPAddressType& other_value, boolean legacy = FALSE) const;
TCCInterface__IPAddressType::enum_type valueof() const;
void set_type(template_sel template_type, unsigned int list_length);
TCCInterface__IPAddressType_template& list_item(unsigned int list_index);
void log() const;
void log_match(const TCCInterface__IPAddressType& match_value, boolean legacy = FALSE) const;
void encode_text(Text_Buf& text_buf) const;
void decode_text(Text_Buf& text_buf);
boolean is_present(boolean legacy = FALSE) const;
boolean match_omit(boolean legacy = FALSE) const;
void set_param(Module_Param& param);
void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
};

class TCCInterface__ProtocolType : public Base_Type { // enum
friend class TCCInterface__ProtocolType_template;
public:
enum enum_type { PROTO__TYPE__UDP = 0, PROTO__TYPE__TCP = 1, PROTO__TYPE__SCTP = 2, UNKNOWN_VALUE = 3, UNBOUND_VALUE = 4 };
private:
enum_type enum_value;

public:
TCCInterface__ProtocolType();
TCCInterface__ProtocolType(int other_value);
TCCInterface__ProtocolType(enum_type other_value);
TCCInterface__ProtocolType(const TCCInterface__ProtocolType& other_value);

TCCInterface__ProtocolType& operator=(int other_value);
TCCInterface__ProtocolType& operator=(enum_type other_value);
TCCInterface__ProtocolType& operator=(const TCCInterface__ProtocolType& other_value);

boolean operator==(enum_type other_value) const;
boolean operator==(const TCCInterface__ProtocolType& other_value) const;
inline boolean operator!=(enum_type other_value) const { return !(*this == other_value); }
inline boolean operator!=(const TCCInterface__ProtocolType& other_value) const { return !(*this == other_value); }
boolean operator<(enum_type other_value) const;
boolean operator<(const TCCInterface__ProtocolType& other_value) const;
boolean operator>(enum_type other_value) const;
boolean operator>(const TCCInterface__ProtocolType& other_value) const;
inline boolean operator<=(enum_type other_value) const { return !(*this > other_value); }
inline boolean operator<=(const TCCInterface__ProtocolType& other_value) const { return !(*this > other_value); }
inline boolean operator>=(enum_type other_value) const { return !(*this < other_value); }
inline boolean operator>=(const TCCInterface__ProtocolType& other_value) const { return !(*this < other_value); }

static const char *enum_to_str(enum_type enum_par);
static enum_type str_to_enum(const char *str_par);
static boolean is_valid_enum(int int_par);

static int enum2int(enum_type enum_par);
static int enum2int(const TCCInterface__ProtocolType& enum_par);
int as_int() const { return enum2int(enum_value); }
void from_int(int p_val) { *this = p_val; }
void int2enum(int int_val);
operator enum_type() const;
inline boolean is_bound() const { return enum_value != UNBOUND_VALUE; }
inline boolean is_value() const { return enum_value != UNBOUND_VALUE; }
inline void clean_up(){ enum_value = UNBOUND_VALUE; }
inline boolean is_present() const { return is_bound(); }
void log() const;
void set_param(Module_Param& param);
void encode_text(Text_Buf& text_buf) const;
void decode_text(Text_Buf& text_buf);
};

class TCCInterface__ProtocolType_template : public Base_Template {
union {
TCCInterface__ProtocolType::enum_type single_value;
struct {
unsigned int n_values;
TCCInterface__ProtocolType_template *list_value;
} value_list;
struct {
TCCInterface__ProtocolType_template* precondition;
TCCInterface__ProtocolType_template* implied_template;
} implication_;
dynmatch_struct<TCCInterface__ProtocolType>* dyn_match;
};

void copy_template(const TCCInterface__ProtocolType_template& other_value);

public:
TCCInterface__ProtocolType_template();
TCCInterface__ProtocolType_template(template_sel other_value);
TCCInterface__ProtocolType_template(int other_value);
TCCInterface__ProtocolType_template(TCCInterface__ProtocolType::enum_type other_value);
TCCInterface__ProtocolType_template(const TCCInterface__ProtocolType& other_value);
TCCInterface__ProtocolType_template(const OPTIONAL<TCCInterface__ProtocolType>& other_value);
TCCInterface__ProtocolType_template(TCCInterface__ProtocolType_template* p_precondition, TCCInterface__ProtocolType_template* p_implied_template);
TCCInterface__ProtocolType_template(Dynamic_Match_Interface<TCCInterface__ProtocolType>* p_dyn_match);
TCCInterface__ProtocolType_template(const TCCInterface__ProtocolType_template& other_value);
~TCCInterface__ProtocolType_template();

boolean is_bound() const;
boolean is_value() const;
void clean_up();
TCCInterface__ProtocolType_template& operator=(template_sel other_value);
TCCInterface__ProtocolType_template& operator=(int other_value);
TCCInterface__ProtocolType_template& operator=(TCCInterface__ProtocolType::enum_type other_value);
TCCInterface__ProtocolType_template& operator=(const TCCInterface__ProtocolType& other_value);
TCCInterface__ProtocolType_template& operator=(const OPTIONAL<TCCInterface__ProtocolType>& other_value);
TCCInterface__ProtocolType_template& operator=(const TCCInterface__ProtocolType_template& other_value);

boolean match(TCCInterface__ProtocolType::enum_type other_value, boolean legacy = FALSE) const;
boolean match(const TCCInterface__ProtocolType& other_value, boolean legacy = FALSE) const;
TCCInterface__ProtocolType::enum_type valueof() const;
void set_type(template_sel template_type, unsigned int list_length);
TCCInterface__ProtocolType_template& list_item(unsigned int list_index);
void log() const;
void log_match(const TCCInterface__ProtocolType& match_value, boolean legacy = FALSE) const;
void encode_text(Text_Buf& text_buf) const;
void decode_text(Text_Buf& text_buf);
boolean is_present(boolean legacy = FALSE) const;
boolean match_omit(boolean legacy = FALSE) const;
void set_param(Module_Param& param);
void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
};

class TCCInterface__PortStatus : public Base_Type { // enum
friend class TCCInterface__PortStatus_template;
public:
enum enum_type { PORT__STATUS__WAS__VACANT = 0, PORT__STATUS__WAS__OCCUPIED = 1, PORT__STATUS__PARAMETER__ERROR = 2, PORT__STATUS__INTERNAL__ERROR = 3, UNKNOWN_VALUE = 4, UNBOUND_VALUE = 5 };
private:
enum_type enum_value;

public:
TCCInterface__PortStatus();
TCCInterface__PortStatus(int other_value);
TCCInterface__PortStatus(enum_type other_value);
TCCInterface__PortStatus(const TCCInterface__PortStatus& other_value);

TCCInterface__PortStatus& operator=(int other_value);
TCCInterface__PortStatus& operator=(enum_type other_value);
TCCInterface__PortStatus& operator=(const TCCInterface__PortStatus& other_value);

boolean operator==(enum_type other_value) const;
boolean operator==(const TCCInterface__PortStatus& other_value) const;
inline boolean operator!=(enum_type other_value) const { return !(*this == other_value); }
inline boolean operator!=(const TCCInterface__PortStatus& other_value) const { return !(*this == other_value); }
boolean operator<(enum_type other_value) const;
boolean operator<(const TCCInterface__PortStatus& other_value) const;
boolean operator>(enum_type other_value) const;
boolean operator>(const TCCInterface__PortStatus& other_value) const;
inline boolean operator<=(enum_type other_value) const { return !(*this > other_value); }
inline boolean operator<=(const TCCInterface__PortStatus& other_value) const { return !(*this > other_value); }
inline boolean operator>=(enum_type other_value) const { return !(*this < other_value); }
inline boolean operator>=(const TCCInterface__PortStatus& other_value) const { return !(*this < other_value); }

static const char *enum_to_str(enum_type enum_par);
static enum_type str_to_enum(const char *str_par);
static boolean is_valid_enum(int int_par);

static int enum2int(enum_type enum_par);
static int enum2int(const TCCInterface__PortStatus& enum_par);
int as_int() const { return enum2int(enum_value); }
void from_int(int p_val) { *this = p_val; }
void int2enum(int int_val);
operator enum_type() const;
inline boolean is_bound() const { return enum_value != UNBOUND_VALUE; }
inline boolean is_value() const { return enum_value != UNBOUND_VALUE; }
inline void clean_up(){ enum_value = UNBOUND_VALUE; }
inline boolean is_present() const { return is_bound(); }
void log() const;
void set_param(Module_Param& param);
void encode_text(Text_Buf& text_buf) const;
void decode_text(Text_Buf& text_buf);
};

class TCCInterface__PortStatus_template : public Base_Template {
union {
TCCInterface__PortStatus::enum_type single_value;
struct {
unsigned int n_values;
TCCInterface__PortStatus_template *list_value;
} value_list;
struct {
TCCInterface__PortStatus_template* precondition;
TCCInterface__PortStatus_template* implied_template;
} implication_;
dynmatch_struct<TCCInterface__PortStatus>* dyn_match;
};

void copy_template(const TCCInterface__PortStatus_template& other_value);

public:
TCCInterface__PortStatus_template();
TCCInterface__PortStatus_template(template_sel other_value);
TCCInterface__PortStatus_template(int other_value);
TCCInterface__PortStatus_template(TCCInterface__PortStatus::enum_type other_value);
TCCInterface__PortStatus_template(const TCCInterface__PortStatus& other_value);
TCCInterface__PortStatus_template(const OPTIONAL<TCCInterface__PortStatus>& other_value);
TCCInterface__PortStatus_template(TCCInterface__PortStatus_template* p_precondition, TCCInterface__PortStatus_template* p_implied_template);
TCCInterface__PortStatus_template(Dynamic_Match_Interface<TCCInterface__PortStatus>* p_dyn_match);
TCCInterface__PortStatus_template(const TCCInterface__PortStatus_template& other_value);
~TCCInterface__PortStatus_template();

boolean is_bound() const;
boolean is_value() const;
void clean_up();
TCCInterface__PortStatus_template& operator=(template_sel other_value);
TCCInterface__PortStatus_template& operator=(int other_value);
TCCInterface__PortStatus_template& operator=(TCCInterface__PortStatus::enum_type other_value);
TCCInterface__PortStatus_template& operator=(const TCCInterface__PortStatus& other_value);
TCCInterface__PortStatus_template& operator=(const OPTIONAL<TCCInterface__PortStatus>& other_value);
TCCInterface__PortStatus_template& operator=(const TCCInterface__PortStatus_template& other_value);

boolean match(TCCInterface__PortStatus::enum_type other_value, boolean legacy = FALSE) const;
boolean match(const TCCInterface__PortStatus& other_value, boolean legacy = FALSE) const;
TCCInterface__PortStatus::enum_type valueof() const;
void set_type(template_sel template_type, unsigned int list_length);
TCCInterface__PortStatus_template& list_item(unsigned int list_index);
void log() const;
void log_match(const TCCInterface__PortStatus& match_value, boolean legacy = FALSE) const;
void encode_text(Text_Buf& text_buf) const;
void decode_text(Text_Buf& text_buf);
boolean is_present(boolean legacy = FALSE) const;
boolean match_omit(boolean legacy = FALSE) const;
void set_param(Module_Param& param);
void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
};


/* Function prototypes */

extern TCCInterface__PortStatus f__getPortAvailabilityStatus(const CHARSTRING& ipAddress, const INTEGER& portNumber, const TCCInterface__ProtocolType& protocolType);
extern void f__setIP(const CHARSTRING& interface, const CHARSTRING& ipaddress, const CHARSTRING& subnetmask, const CHARSTRING& broadcast, const INTEGER& number);
extern BOOLEAN f__setIP__ip(const CHARSTRING& interface, const CHARSTRING& ipaddress, const INTEGER& prefix, const INTEGER& v__set);
extern BOOLEAN f__delIP__ip(const CHARSTRING& interface, const CHARSTRING& ipaddress, const INTEGER& prefix);
extern void f__deleteIP(const CHARSTRING& interface);
extern void f__getIP(const CHARSTRING& interface, CHARSTRING& ip, CHARSTRING& netmask, CHARSTRING& broadcast, const TCCInterface__IPAddressType& addressType);
extern void f__setInterfaceUp(const CHARSTRING& interface, const TCCInterface__IPAddressType& addressType);
extern void f__setInterfaceDown(const CHARSTRING& interface, const TCCInterface__IPAddressType& addressType);
extern CHARSTRING f__getHostName();
extern CHARSTRING f__getIpAddr(const CHARSTRING& hostname, const TCCInterface__IPAddressType& addressType);
extern IPAddresses f__getIpAddresses(const CHARSTRING& hostname);
extern BOOLEAN f__verifyIpAddr(const CHARSTRING& pl__host, const TCCInterface__IPAddressType& pl__ipType);
extern void pre_init_module();
extern void post_init_module();

/* Global variable declarations */

extern const TTCN_Typedescriptor_t CharstringList_descr_;
extern const XERdescriptor_t CharstringList_0_xer_;
extern const TTCN_Typedescriptor_t CharstringList_0_descr_;
extern const TTCN_Typedescriptor_t IPAddresses_descr_;
extern const TTCN_Typedescriptor_t TCCInterface__IPAddressType_descr_;
extern const TTCN_Typedescriptor_t TCCInterface__ProtocolType_descr_;
extern const TTCN_Typedescriptor_t TCCInterface__PortStatus_descr_;
extern const INTEGER& f__setIP_number_defval;
extern INTEGER const_f__setIP_number_defval;
extern const INTEGER& f__setIP__ip_prefix_defval;
extern INTEGER const_f__setIP__ip_prefix_defval;
extern const INTEGER& f__setIP__ip_v__set_defval;
extern INTEGER const_f__setIP__ip_v__set_defval;
extern const INTEGER& f__delIP__ip_prefix_defval;
extern INTEGER const_f__delIP__ip_prefix_defval;
extern const TCCInterface__IPAddressType& f__getIP_addressType_defval;
extern TCCInterface__IPAddressType const_f__getIP_addressType_defval;
extern const TCCInterface__IPAddressType& f__setInterfaceUp_addressType_defval;
extern TCCInterface__IPAddressType const_f__setInterfaceUp_addressType_defval;
extern const TCCInterface__IPAddressType& f__setInterfaceDown_addressType_defval;
extern TCCInterface__IPAddressType const_f__setInterfaceDown_addressType_defval;
extern const TCCInterface__IPAddressType& f__getIpAddr_addressType_defval;
extern TCCInterface__IPAddressType const_f__getIpAddr_addressType_defval;
extern const TCCInterface__IPAddressType& f__verifyIpAddr_pl__ipType_defval;
extern TCCInterface__IPAddressType const_f__verifyIpAddr_pl__ipType_defval;
extern const OCTETSTRING os_0;
extern const CHARSTRING cs_0;
extern const unsigned char module_checksum[];
extern TTCN_Module module_object;
extern const RuntimeVersionChecker ver_checker;

} /* end of namespace */

#endif
