Skip to content

Commit 871d063

Browse files
committed
The path to the application directory is passed to the initialization function
1 parent de7c68e commit 871d063

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/Init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ bool initServerObjects(HttpClient::Request *procRequest, HttpClient::Response *p
211211
return success;
212212
}
213213

214-
void cleanProtocolData(HttpClient::Response *response)
214+
void freeProtocolData(HttpClient::Response *response)
215215
{
216216
if (response)
217217
{

src/Init.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ void destroySocketAdapter(Socket::Adapter *adapter);
1111
std::string getClearPath(const std::string &path);
1212

1313
bool initServerObjects(HttpClient::Request *procRequest, HttpClient::Response *procResponse, const Transfer::app_request *request, Socket::Adapter *socket_adapter);
14-
void cleanProtocolData(HttpClient::Response *response);
14+
void freeProtocolData(HttpClient::Response *response);
1515

1616
bool isSwitchingProtocols(const HttpClient::Request &request, HttpClient::Response &response);

src/Main.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
#include "utils/Utils.h"
88

9-
DLLEXPORT bool application_init()
9+
EXPORT bool application_init(const char *root)
1010
{
1111
return true;
1212
}
1313

14-
DLLEXPORT int application_call(Transfer::app_request *request, Transfer::app_response *response)
14+
EXPORT int application_call(Transfer::app_request *request, Transfer::app_response *response)
1515
{
1616
// Allocate memory on the stack
1717
uint8_t addr[sizeof(Socket::AdapterTls)];
@@ -61,20 +61,20 @@ DLLEXPORT int application_call(Transfer::app_request *request, Transfer::app_res
6161
Utils::packContainer(reinterpret_cast<uint8_t *>(response->response_data), proc_response.headers);
6262
}
6363

64-
cleanProtocolData(&proc_response);
64+
freeProtocolData(&proc_response);
6565

6666
return result;
6767
}
6868

69-
DLLEXPORT void application_clear(void *response_data, size_t response_size)
69+
EXPORT void application_clear(void *response_data, size_t response_size)
7070
{
7171
if (response_data && response_size)
7272
{
7373
delete[] reinterpret_cast<uint8_t *>(response_data);
7474
}
7575
}
7676

77-
DLLEXPORT void application_final()
77+
EXPORT void application_final(const char *root)
7878
{
7979

8080
}

src/Main.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22

33
#ifdef WIN32
4-
#define DLLEXPORT extern "C" __declspec(dllexport)
4+
#define EXPORT extern "C" __declspec(dllexport)
55
#else
6-
#define DLLEXPORT extern "C"
6+
#define EXPORT extern "C"
77
#endif

0 commit comments

Comments
 (0)