ANNA Suite  2020b
Multipurpose development suite for Telco applications
ClientSide.hpp
Go to the documentation of this file.
1 // ANNA - Anna is Not Nothingness Anymore //
2 // //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
4 // //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
7 
8 
9 #ifndef anna_http_wims20_ClientSide_hpp
10 #define anna_http_wims20_ClientSide_hpp
11 
12 #include <anna/core/functions.hpp>
13 
15 
16 namespace anna {
17 
18 namespace http {
19 
20 class Request;
21 
22 namespace wims20 {
23 
47 class ClientSide : public Abstract {
48 public:
55  ClientSide(const std::string& domain, const std::string& path) :
56  Abstract("ClientSide", domain, path) {
57  a_strOtherLevels = NULL;
58  }
59 
65  explicit ClientSide(const std::string& domain) :
66  Abstract("ClientSide", domain) {
67  a_strOtherLevels = NULL;
68  }
69 
73  ~ClientSide() { Abstract::destroyString(a_strOtherLevels); }
74 
79  void addOtherLevel(const std::string& otherLevel) noexcept(false);
80 
85  void addOtherLevel(const char* otherLevel) noexcept(false) {
86  std::string aux(otherLevel);
87  addOtherLevel(aux);
88  }
89 
96  void setParameter(const char* parameter, const char* value) noexcept(false) {
97  std::string p(parameter);
98  std::string v(value);
100  }
101 
108  void setParameter(const char* parameter, const int value) noexcept(false) {
109  std::string p(parameter);
111  }
112 
119  void setParameter(const std::string& parameter, const std::string& value) noexcept(false) {
120  Abstract::parameter_set(parameter, value);
121  }
122 
129  void setParameter(const std::string& parameter, const int value) noexcept(false) {
131  }
132 
139  Abstract::destroyString(a_strOtherLevels);
140  a_strOtherLevels = NULL;
141  }
142 
149  void codeOn(http::Request& message) noexcept(false);
150 
151 private:
152  std::string* a_strOtherLevels;
153  std::string a_uri;
154 };
155 
156 }
157 }
158 }
159 
160 #endif
void setParameter(const std::string &parameter, const int value) noexcept(false)
Definition: ClientSide.hpp:129
ClientSide(const std::string &domain, const std::string &path)
Definition: ClientSide.hpp:55
Definition: Request.hpp:22
void addOtherLevel(const std::string &otherLevel) noexcept(false)
Definition: Abstract.hpp:46
void codeOn(http::Request &message) noexcept(false)
~ClientSide()
Definition: ClientSide.hpp:73
static std::string asString(const int number)
void parameter_set(const std::string &name, const std::string &value) noexcept(false)
void setParameter(const char *parameter, const int value) noexcept(false)
Definition: ClientSide.hpp:108
static std::string * otherLevel(other_level_iterator ii)
Definition: Abstract.hpp:164
void addOtherLevel(const char *otherLevel) noexcept(false)
Definition: ClientSide.hpp:85
void setParameter(const char *parameter, const char *value) noexcept(false)
Definition: ClientSide.hpp:96
void setParameter(const std::string &parameter, const std::string &value) noexcept(false)
Definition: ClientSide.hpp:119
void destroyString(std::string *str)
Definition: Abstract.hpp:274
Definition: app.hpp:12
ClientSide(const std::string &domain)
Definition: ClientSide.hpp:65
void clearOtherLevels()
Definition: ClientSide.hpp:137
virtual void clearOtherLevels()
Definition: ClientSide.hpp:47