libepp_nicbr
SheppPrint.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id: SheppPrint.H 1086 2010-12-10 13:07:28Z eduardo $ */
7 #ifndef __SHEPP_PRINT_H__
8 #define __SHEPP_PRINT_H__
9 
10 #include "CommonData.H"
11 
13 class SheppPrint {
14 public:
15  //used by both domain and contact
16 
18 
21  static void authInfo(AuthInfo auth) {
22  if (auth.get_pw() != "") {
23  printf(" authInfo pw: [%s]\n", auth.get_pw().c_str());
24  if (auth.get_roid() != "") {
25  printf(" roid: [%s]\n", auth.get_roid().c_str());
26  }
27  }
28  }
29 
30  //used by domain only
31 
33 
36  static void nameserver(NameServer ns)
37  {
38  printf(" nameserver %s\n", ns.name.c_str());
39 
40  set<NSIPAddr>::const_iterator it;
41  set<NSIPAddr> ips = ns.ips;
42  for (it = ips.begin(); it != ips.end(); it++) {
43  printf(" %s: %s\n", (*it).version.c_str(), (*it).addr.c_str());
44  }
45  }
46 
47  //used by contact only
48 
50 
53  static void postal_info(PostalInfo postal)
54  {
55  printf(" PostalInfo:\n");
56  printf(" type: [%s]\n", postal.get_type().c_str());
57 
58  if (postal.get_name() != "") {
59  printf(" name: [%s]\n", postal.get_name().c_str());
60  }
61  if (postal.get_org() != "") {
62  printf(" org : [%s]\n", postal.get_org().c_str());
63  }
64 
65  if (postal.get_str1() != "") {
66  printf(" str1: [%s]\n", postal.get_str1().c_str());
67  }
68  if (postal.get_str2() != "") {
69  printf(" str2: [%s]\n", postal.get_str2().c_str());
70  }
71  if (postal.get_str3() != "") {
72  printf(" str3: [%s]\n", postal.get_str3().c_str());
73  }
74 
75  if (postal.get_city() != "") {
76  printf(" city: [%s]\n", postal.get_city().c_str());
77  }
78 
79  if (postal.get_sp() != "") {
80  printf(" s/p : [%s]\n", postal.get_sp().c_str());
81  }
82 
83  if (postal.get_pc() != "") {
84  printf(" pc : [%s]\n", postal.get_pc().c_str());
85  }
86 
87  if (postal.get_cc() != "") {
88  printf(" cc : [%s]\n", postal.get_cc().c_str());
89  }
90  }
91 
93 
97  {
98  printf(" number: [%s] ext: [%s]\n", phone.number.c_str(),
99  phone.ext.c_str());
100  }
101 
103 
107  {
108  printf(" disclose (flag=%d) [ ", disclose.flag);
109  if (disclose.name_int) {
110  printf("name_int ");
111  }
112  if (disclose.name_loc) {
113  printf("name_loc ");
114  }
115  if (disclose.org_int) {
116  printf("org_int ");
117  }
118  if (disclose.org_loc) {
119  printf("org_loc ");
120  }
121  if (disclose.addr_int) {
122  printf("addr_int ");
123  }
124  if (disclose.addr_loc) {
125  printf("addr_loc ");
126  }
127  if (disclose.voice) {
128  printf("voice ");
129  }
130  if (disclose.fax) {
131  printf("fax ");
132  }
133  if (disclose.email) {
134  printf("email ");
135  }
136  printf("]\n");
137  }
138 };
139 
140 #endif //__SHEPP_PRINT_H__
EPP CommonData Class.
static void authInfo(AuthInfo auth)
prints an AuthInfo object
Definition: SheppPrint.H:21
Definition: CommonData.H:183
PostalInfo class.
Definition: CommonData.H:281
string get_roid() const
Returns repository object ID.
Definition: CommonData.H:115
shepp object information screen printing class
Definition: SheppPrint.H:13
static void postal_info(PostalInfo postal)
prints a PostalInfo object
Definition: SheppPrint.H:53
Definition: CommonData.H:491
static void disclose(CommonData::Disclose disclose)
prints a Disclose object
Definition: SheppPrint.H:106
string get_pw() const
Returns the password.
Definition: CommonData.H:140
Definition: CommonData.H:524
static void nameserver(NameServer ns)
prints a NameServer object
Definition: SheppPrint.H:36
static void phone(CommonData::Phone phone)
prints a Phone object
Definition: SheppPrint.H:96
AuthInfo Class.
Definition: CommonData.H:83