summaryrefslogtreecommitdiff
path: root/ACE/apps/drwho/Protocol_Record.cpp
blob: a04454e51bb0be6d5249e339a4391e96651ef554 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// $Id$

#include "Options.h"
#include "Protocol_Record.h"
#include "ace/Log_Msg.h"

// Static initialization.

Drwho_Node Protocol_Record::drwho_node_;

Protocol_Record::~Protocol_Record (void)
{
  if (Options::get_opt (Options::DEBUG))
    ACE_DEBUG ((LM_DEBUG,
                "disposing Protocol_Record\n"));

  for (Drwho_Node *np = this->get_drwho_list ();
       np != 0; )
    {
      Drwho_Node *t = np;
      np = np->next_;
      delete t;
    }
}

Protocol_Record::Protocol_Record (void)
  : key_name1_ (0),
    key_name2_ (0),
    drwho_list_ (0),
    next_ (0),
    is_active_ (0)
{
}

Protocol_Record::Protocol_Record (int)
  : key_name1_ (0),
    key_name2_ (0),
    drwho_list_ (&Protocol_Record::drwho_node_),
    next_ (0),
    is_active_ (0)
{
}

Protocol_Record::Protocol_Record (const char *kn1,
                                  Protocol_Record *next)
  : key_name1_ (kn1),
    key_name2_ (0),
    drwho_list_ (0),
    next_ (next),
    is_active_ (0)
{
}

const char *
Protocol_Record::get_login (void)
{
  return this->key_name1_;
}

const char *
Protocol_Record::set_login (const char *str)
{
  this->key_name1_ = str;
  return str;
}

const char *
Protocol_Record::get_real (void)
{
  return this->key_name2_;
}

const char *
Protocol_Record::get_host (void)
{
  return this->key_name1_;
}

const char *
Protocol_Record::set_host (const char *str)
{
  this->key_name1_ = str;
  return str;
}

const char *
Protocol_Record::set_real (const char *str)
{
  this->key_name2_ = str;
  return str;
}

Drwho_Node *
Protocol_Record::get_drwho_list (void)
{
  return this->drwho_list_;
}