Skip to content

Commit 927ea1a

Browse files
committed
Added parameter names in the header files (*.h)
1 parent 04bcfac commit 927ea1a

23 files changed

+189
-195
lines changed

projects/qt-creator/httpserver.pro

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ unix {
1414

1515
CONFIG(debug, debug|release):DEFINES += DEBUG
1616

17-
CONFIG(release, debug|release)
18-
{
19-
QMAKE_CFLAGS_RELEASE -= -O
20-
QMAKE_CFLAGS_RELEASE -= -O1
21-
QMAKE_CFLAGS_RELEASE *= -O2
17+
#CONFIG(release, debug|release)
18+
#{
19+
# QMAKE_CFLAGS_RELEASE -= -O
20+
# QMAKE_CFLAGS_RELEASE -= -O1
21+
# QMAKE_CFLAGS_RELEASE -= -O2
2222
# QMAKE_CFLAGS_RELEASE *= -O3
23-
}
23+
#}
2424

2525
LIBS += -ldl -pthread
2626

projects/qt-creator/httpserver.pro.user

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!DOCTYPE QtCreatorProject>
3-
<!-- Written by QtCreator 3.5.1, 2015-11-13T21:39:35. -->
3+
<!-- Written by QtCreator 3.5.1, 2015-11-16T00:54:33. -->
44
<qtcreator>
55
<data>
66
<variable>EnvironmentId</variable>
@@ -61,7 +61,7 @@
6161
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
6262
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
6363
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{c77ee4a2-1c2a-4bac-9185-8378ec4ebf5d}</value>
64-
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
64+
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
6565
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
6666
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
6767
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">

src/ConfigParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace HttpServer
1212
/**
1313
* Config - include file
1414
*/
15-
bool ConfigParser::includeConfigFile(const std::string &fileName, std::string &strBuf, const std::size_t offset = 0)
15+
bool ConfigParser::includeConfigFile(const std::string &fileName, std::string &strBuf, const std::size_t offset)
1616
{
1717
std::ifstream file(fileName);
1818

src/ConfigParser.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ namespace HttpServer
1212
class ConfigParser
1313
{
1414
private:
15-
bool includeConfigFile(const std::string &, std::string &, const size_t);
15+
bool includeConfigFile(const std::string &fileName, std::string &strBuf, const size_t offset = 0);
1616

1717
bool addApplication(
18-
const std::unordered_map<std::string, std::string> &,
19-
const ServerApplicationDefaultSettings &,
18+
const std::unordered_map<std::string, std::string> &app,
19+
const ServerApplicationDefaultSettings &defaults,
2020
std::vector<Module> &modules,
2121
ServerApplicationsTree &apps_tree
2222
);

src/DataVariantAbstract.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ namespace HttpServer
2323
virtual ~DataVariantAbstract() = default;
2424

2525
/**
26-
* @param const Socket & - сокет, откуда можно достать остальные данные
27-
* @param std::string & - первая часть полученных данных
28-
* @param const size_t - сколько осталось данных (в байтах) получить из сокета
29-
* @param const std::unordered_map<std::string, std::string> & - дополнительные параметры, описывающие формат данных
30-
* @param request_data & - данные текущего запроса (заголовки, параметры, коллекции для хранения данных)
26+
* @param const Socket &sock - сокет, откуда можно достать остальные данные
27+
* @param std::string &str - первая часть полученных данных
28+
* @param const size_t leftBytes - сколько осталось данных (в байтах) получить из сокета
29+
* @param const std::unordered_map<std::string, std::string> &contentParams - дополнительные параметры, описывающие формат данных
30+
* @param request_data &rp - данные текущего запроса (заголовки, параметры, коллекции для хранения данных)
3131
*
3232
* @return bool - (true|false) - удачно ли были разобраны данные
3333
*/
3434
virtual bool parse
3535
(
3636
const Socket &sock,
37-
std::string &,
38-
const size_t,
37+
std::string &str,
38+
const size_t leftBytes,
3939
std::unordered_map<std::string, std::string> &contentParams,
4040
struct request_parameters &rp
4141
) = 0;

src/DataVariantFormUrlencoded.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ namespace HttpServer
1212
public:
1313
virtual bool parse
1414
(
15-
const Socket &,
16-
std::string &,
17-
const size_t,
15+
const Socket &sock,
16+
std::string & str,
17+
const size_t leftBytes,
1818
std::unordered_map<std::string, std::string> &contentParams,
1919
struct request_parameters &rp
2020
) override;

src/DataVariantMultipartFormData.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ namespace HttpServer
1212
protected:
1313
bool append
1414
(
15-
const Socket &,
16-
const std::chrono::milliseconds &,
17-
std::vector<std::string::value_type> &,
18-
std::string &,
19-
const std::string &,
20-
const size_t &,
21-
size_t &,
22-
size_t &
15+
const Socket &sock,
16+
const std::chrono::milliseconds &timeout,
17+
std::vector<std::string::value_type> &buf,
18+
std::string &str_buf,
19+
const std::string &data_end,
20+
const size_t &leftBytes,
21+
size_t &recv_len,
22+
size_t &read_len
2323
) const;
2424

2525
public:
2626
virtual bool parse
2727
(
28-
const Socket &,
29-
std::string &,
30-
const size_t,
28+
const Socket &sock,
29+
std::string &str,
30+
const size_t leftBytes,
3131
std::unordered_map<std::string, std::string> &contentParams,
3232
struct request_parameters &rp
3333
) override;

src/DataVariantTextPlain.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ namespace HttpServer
1212
public:
1313
virtual bool parse
1414
(
15-
const Socket &,
16-
std::string &,
17-
const size_t,
15+
const Socket &sock,
16+
std::string &str,
17+
const size_t leftBytes,
1818
std::unordered_map<std::string, std::string> &contentParams,
1919
struct request_parameters &rp
2020
) override;

src/Event.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ namespace HttpServer
5252

5353
void Event::notify()
5454
{
55-
// std::unique_lock<std::mutex> lck(mtx);
5655
signaled = true;
5756
cv.notify_all();
5857
}
@@ -61,8 +60,6 @@ namespace HttpServer
6160
{
6261
if (threadsCount)
6362
{
64-
// std::unique_lock<std::mutex> lck(mtx);
65-
6663
signaled = true;
6764

6865
for (size_t i = 0; i < threadsCount; ++i)
@@ -74,15 +71,11 @@ namespace HttpServer
7471

7572
void Event::reset()
7673
{
77-
// std::unique_lock<std::mutex> lck(mtx);
78-
7974
signaled = false;
8075
}
8176

82-
bool Event::notifed()
77+
bool Event::notifed() const
8378
{
84-
// std::unique_lock<std::mutex> lck(mtx);
85-
8679
return signaled;
8780
}
8881
};

src/Event.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ namespace HttpServer
2020

2121
public:
2222
void wait();
23-
bool wait_for(const std::chrono::milliseconds &);
24-
bool wait_until(const std::chrono::high_resolution_clock::time_point &);
23+
bool wait_for(const std::chrono::milliseconds &ms);
24+
bool wait_until(const std::chrono::high_resolution_clock::time_point &tp);
2525

2626
void notify();
27-
void notify(const size_t);
27+
void notify(const size_t threadsCount);
2828

2929
void reset();
3030

31-
bool notifed();
31+
bool notifed() const;
3232
};
3333
};

0 commit comments

Comments
 (0)