Commit a715c30a03e1dba32e551a00299fe63e3b6048c4
1 parent
d14aed55
Exists in
master
Netmask também sendo pegada.
Showing
2 changed files
with
15 additions
and
10 deletions
Show diff stats
src/cacic_comm.h
... | ... | @@ -146,6 +146,11 @@ public: |
146 | 146 | } |
147 | 147 | } |
148 | 148 | |
149 | + /* login | |
150 | + * realiza login com usuario e senha | |
151 | + * @return retorna json com sessão e chave de criptografia | |
152 | + * exemplo: 200 OK | |
153 | + */ | |
149 | 154 | QJsonObject login() { |
150 | 155 | // Cria dados de login |
151 | 156 | QVariantMap login; |
... | ... | @@ -153,36 +158,34 @@ public: |
153 | 158 | login["password"] = this->password; |
154 | 159 | // QJsonValue sessionvalue = OCacic.jsonValueFromJsonString(json["reply"].toString(), "session"); |
155 | 160 | // Cria conexão e retorna Json da sessão |
156 | - QJsonObject retorno = this->comm("/ws/neo/login", QJsonObject::fromVariantMap(login), true); | |
157 | - return retorno; | |
161 | + return this->comm("/ws/neo/login", QJsonObject::fromVariantMap(login), true); | |
162 | + } | |
158 | 163 | |
164 | + QString getUrlSsl (){ | |
165 | + return this->urlSsl; | |
159 | 166 | } |
160 | 167 | |
161 | 168 | void setUrlSsl(QString value){ |
162 | 169 | this->urlSsl = value; |
163 | 170 | } |
164 | 171 | |
165 | - QString getUrlSsl (){ | |
166 | - return this->urlSsl; | |
167 | - } | |
168 | - | |
169 | 172 | QString getPassword() |
170 | 173 | { |
171 | - return password; | |
174 | + return this->password; | |
172 | 175 | } |
173 | 176 | |
174 | 177 | void setPassword(QString value) |
175 | 178 | { |
176 | - password = value; | |
179 | + this->password = value; | |
177 | 180 | } |
178 | 181 | QString getUsuario() |
179 | 182 | { |
180 | - return usuario; | |
183 | + return this->usuario; | |
181 | 184 | } |
182 | 185 | |
183 | 186 | void setUsuario(QString value) |
184 | 187 | { |
185 | - usuario = value; | |
188 | + this->usuario = value; | |
186 | 189 | } |
187 | 190 | |
188 | 191 | ... | ... |
src/cacic_computer.cpp
... | ... | @@ -30,8 +30,10 @@ QList<QVariantMap> CACIC_Computer::networkInterfacesRunning(){ |
30 | 30 | foreach (QNetworkAddressEntry ae, in.addressEntries()){ |
31 | 31 | if (ae.ip().scopeId() == ""){ |
32 | 32 | mapInterface["ipv4"] = ae.ip().toString(); |
33 | + mapInterface["netmask_ipv4"] = ae.netmask().toString(); | |
33 | 34 | } else { |
34 | 35 | mapInterface["ipv6"] = ae.ip().toString(); |
36 | + mapInterface["netmask_ipv6"] = ae.netmask().toString(); | |
35 | 37 | } |
36 | 38 | // qDebug() << ae.ip().toString() << "\n"; |
37 | 39 | } | ... | ... |