Skip to content

Commit ed10b2b

Browse files
committed
Пересборка класса авторизации
1 parent 708958e commit ed10b2b

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ int main(int argc, char * argv[]) noexcept {
6666
network_t nwk(&fmk);
6767
uri_t uri(&fmk, &nwk);
6868
coreCli_t core(&fmk, &log);
69-
rest_t rest(&core, &fmk, &log);
69+
restCli_t rest(&core, &fmk, &log);
7070

7171
log.setLogName("REST Client");
7272
log.setLogFormat("%H:%M:%S %d.%m.%Y");

include/client/rest.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ namespace awh {
369369
* ~Rest Деструктор
370370
*/
371371
~Rest() noexcept;
372-
} rest_t;
372+
} restCli_t;
373373
};
374374

375375
#endif // __AWH_REST_CLIENT__

sample/rest.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ int main(int argc, char * argv[]) noexcept {
3434
// Создаём биндинг
3535
coreCli_t core(&fmk, &log);
3636
// Создаём объект REST запроса
37-
rest_t rest(&core, &fmk, &log);
37+
restCli_t rest(&core, &fmk, &log);
3838
// Устанавливаем название сервиса
3939
log.setLogName("REST Client");
4040
// Устанавливаем формат времени

src/client/rest.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void awh::Rest::closeCallback(const size_t wid, core_t * core, void * ctx) noexc
3939
// Если данные переданы верные
4040
if((core != nullptr) && (ctx != nullptr)){
4141
// Получаем контекст модуля
42-
rest_t * web = reinterpret_cast <rest_t *> (ctx);
42+
restCli_t * web = reinterpret_cast <restCli_t *> (ctx);
4343
// Если нужно произвести запрос заново
4444
if((web->res.code == 301) || (web->res.code == 308) ||
4545
(web->res.code == 401) || (web->res.code == 407)){
@@ -79,7 +79,7 @@ void awh::Rest::connectCallback(const size_t aid, core_t * core, void * ctx) noe
7979
// Если данные переданы верные
8080
if((aid > 0) && (core != nullptr) && (ctx != nullptr)){
8181
// Получаем контекст модуля
82-
rest_t * web = reinterpret_cast <rest_t *> (ctx);
82+
restCli_t * web = reinterpret_cast <restCli_t *> (ctx);
8383
// Выполняем сброс состояния HTTP парсера
8484
web->http->clear();
8585
// Устанавливаем код сообщения
@@ -125,7 +125,7 @@ void awh::Rest::connectProxyCallback(const size_t aid, core_t * core, void * ctx
125125
// Если данные переданы верные
126126
if((aid > 0) && (core != nullptr) && (ctx != nullptr)){
127127
// Получаем контекст модуля
128-
rest_t * web = reinterpret_cast <rest_t *> (ctx);
128+
restCli_t * web = reinterpret_cast <restCli_t *> (ctx);
129129
// Определяем тип прокси-сервера
130130
switch((uint8_t) web->worker.proxy.type){
131131
// Если прокси-сервер является Socks5
@@ -169,7 +169,7 @@ void awh::Rest::readCallback(const char * buffer, const size_t size, const size_
169169
// Если данные существуют
170170
if((buffer != nullptr) && (size > 0) && (aid > 0)){
171171
// Получаем контекст модуля
172-
rest_t * web = reinterpret_cast <rest_t *> (ctx);
172+
restCli_t * web = reinterpret_cast <restCli_t *> (ctx);
173173
// Выполняем парсинг полученных данных
174174
web->http->parse(buffer, size);
175175
// Если все данные получены
@@ -238,7 +238,7 @@ void awh::Rest::readProxyCallback(const char * buffer, const size_t size, const
238238
// Если данные существуют
239239
if((buffer != nullptr) && (size > 0) && (aid > 0)){
240240
// Получаем контекст модуля
241-
rest_t * web = reinterpret_cast <rest_t *> (ctx);
241+
restCli_t * web = reinterpret_cast <restCli_t *> (ctx);
242242
// Определяем тип прокси-сервера
243243
switch((uint8_t) web->worker.proxy.type){
244244
// Если прокси-сервер является Socks5

0 commit comments

Comments
 (0)