Skip to content

Commit 49b746f

Browse files
committed
Update to the latest oatpp API.
1 parent 25f7eb5 commit 49b746f

35 files changed

+51
-164
lines changed

async-server-rooms/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ add_library(${project_name}-lib
2121

2222
## link libs
2323

24-
find_package(oatpp 1.0.0 REQUIRED)
25-
find_package(oatpp-websocket 1.0.0 REQUIRED)
24+
find_package(oatpp 1.1.0 REQUIRED)
25+
find_package(oatpp-websocket 1.1.0 REQUIRED)
2626

2727
target_link_libraries(${project_name}-lib
2828
PUBLIC oatpp::oatpp

async-server-rooms/src/controller/RoomsController.hpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
#include "oatpp/core/macro/codegen.hpp"
1212
#include "oatpp/core/macro/component.hpp"
1313

14+
15+
#include OATPP_CODEGEN_BEGIN(ApiController) //<-- codegen begin
16+
1417
/**
1518
* Controller with WebSocket-connect endpoint.
1619
*/
@@ -25,11 +28,6 @@ class RoomsController : public oatpp::web::server::api::ApiController {
2528
{}
2629
public:
2730

28-
/**
29-
* Begin ENDPOINTs generation ('ApiController' codegen)
30-
*/
31-
#include OATPP_CODEGEN_BEGIN(ApiController)
32-
3331
ENDPOINT_ASYNC("GET", "/", Root) {
3432

3533
ENDPOINT_ASYNC_INIT(Root)
@@ -82,11 +80,8 @@ class RoomsController : public oatpp::web::server::api::ApiController {
8280

8381
// TODO Insert Your endpoints here !!!
8482

85-
/**
86-
* Finish ENDPOINTs generation ('ApiController' codegen)
87-
*/
88-
#include OATPP_CODEGEN_END(ApiController)
89-
9083
};
9184

85+
#include OATPP_CODEGEN_END(ApiController) //<-- codegen end
86+
9287
#endif /* RoomsController_hpp */

async-server-rooms/test/WSTest.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
//
2-
// Created by Leonid on 2019-03-25.
3-
//
41

52
#ifndef MY_PROJECT_WEBSOCKETTEST_HPP
63
#define MY_PROJECT_WEBSOCKETTEST_HPP

async-server/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ add_library(${project_name}-lib
1717

1818
## link libs
1919

20-
find_package(oatpp 1.0.0 REQUIRED)
21-
find_package(oatpp-websocket 1.0.0 REQUIRED)
20+
find_package(oatpp 1.1.0 REQUIRED)
21+
find_package(oatpp-websocket 1.1.0 REQUIRED)
2222

2323
target_link_libraries(${project_name}-lib
2424
PUBLIC oatpp::oatpp

async-server/src/controller/MyController.hpp

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
//
2-
// MyController.hpp
3-
// web-starter-project
4-
//
5-
// Created by Leonid on 2/12/18.
6-
// Copyright © 2018 oatpp. All rights reserved.
7-
//
81

92
#ifndef MyController_hpp
103
#define MyController_hpp
@@ -18,6 +11,8 @@
1811
#include "oatpp/core/macro/codegen.hpp"
1912
#include "oatpp/core/macro/component.hpp"
2013

14+
#include OATPP_CODEGEN_BEGIN(ApiController) //<-- codegen begin
15+
2116
/**
2217
* Controller with WebSocket-connect endpoint.
2318
*/
@@ -32,11 +27,6 @@ class MyController : public oatpp::web::server::api::ApiController {
3227
{}
3328
public:
3429

35-
/**
36-
* Begin ENDPOINTs generation ('ApiController' codegen)
37-
*/
38-
#include OATPP_CODEGEN_BEGIN(ApiController)
39-
4030
ENDPOINT_ASYNC("GET", "/", Root) {
4131

4232
ENDPOINT_ASYNC_INIT(Root)
@@ -72,12 +62,9 @@ class MyController : public oatpp::web::server::api::ApiController {
7262
};
7363

7464
// TODO Insert Your endpoints here !!!
75-
76-
/**
77-
* Finish ENDPOINTs generation ('ApiController' codegen)
78-
*/
79-
#include OATPP_CODEGEN_END(ApiController)
80-
65+
8166
};
8267

68+
#include OATPP_CODEGEN_END(ApiController) //<-- codegen end
69+
8370
#endif /* MyController_hpp */

async-server/src/websocket/WSListener.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
//
2-
// Created by Leonid on 2019-06-07.
3-
//
41

52
#include "WSListener.hpp"
63

async-server/src/websocket/WSListener.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
//
2-
// Created by Leonid on 2019-06-07.
3-
//
41

52
#ifndef WSListener_hpp
63
#define WSListener_hpp

async-server/test/WSTest.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
//
2-
// Created by Leonid on 2019-03-25.
3-
//
41

52
#include "WSTest.hpp"
63

async-server/test/WSTest.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
//
2-
// Created by Leonid on 2019-03-25.
3-
//
41

52
#ifndef MY_PROJECT_WEBSOCKETTEST_HPP
63
#define MY_PROJECT_WEBSOCKETTEST_HPP

client-binance.com/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake/module") # <--
2525

2626
find_package(mbedtls 2.16.0 REQUIRED)
2727

28-
find_package(oatpp 1.0.0 REQUIRED)
29-
find_package(oatpp-websocket 1.0.0 REQUIRED)
30-
find_package(oatpp-mbedtls 1.0.0 REQUIRED)
28+
find_package(oatpp 1.1.0 REQUIRED)
29+
find_package(oatpp-websocket 1.1.0 REQUIRED)
30+
find_package(oatpp-mbedtls 1.1.0 REQUIRED)
3131

3232
target_link_libraries(${project_name}-lib
3333
PUBLIC oatpp::oatpp

0 commit comments

Comments
 (0)