fix doxygen and put everything besides main function in namespace ebusd
This commit is contained in:
+16
-1
@@ -32,9 +32,12 @@
|
||||
#include <string>
|
||||
#include "lib/utils/tcpsocket.h"
|
||||
|
||||
namespace ebusd {
|
||||
|
||||
using std::ostringstream;
|
||||
using std::cin;
|
||||
using std::cout;
|
||||
using std::string;
|
||||
using std::endl;
|
||||
|
||||
/** A structure holding all program options. */
|
||||
@@ -117,7 +120,7 @@ error_t parse_opt(int key, char *arg, struct argp_state *state) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
string fetchData(TCPSocket* socket, bool& listening) {
|
||||
string fetchData(ebusd::TCPSocket* socket, bool& listening) {
|
||||
char data[1024];
|
||||
ssize_t datalen;
|
||||
ostringstream ostream;
|
||||
@@ -289,6 +292,13 @@ void connect(const char* host, uint16_t port, char* const *args, int argCount) {
|
||||
delete client;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Main function.
|
||||
* @param argc the number of command line arguments.
|
||||
* @param argv the command line arguments.
|
||||
* @return the exit code.
|
||||
*/
|
||||
int main(int argc, char* argv[]) {
|
||||
struct argp argp = { argpoptions, parse_opt, argpargsdoc, argpdoc, NULL, NULL, NULL };
|
||||
setenv("ARGP_HELP_FMT", "no-dup-args-note", 0);
|
||||
@@ -300,3 +310,8 @@ int main(int argc, char* argv[]) {
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
} // namespace ebusd
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
return ebusd::main(argc, argv);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user