summaryrefslogtreecommitdiffstats
path: root/src/Common/Request
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/Request')
-rw-r--r--src/Common/Request/DisconnectRequest.cpp67
-rw-r--r--src/Common/Request/DisconnectRequest.h47
-rw-r--r--src/Common/Request/GSSAPIAuthRequest.cpp171
-rw-r--r--src/Common/Request/GSSAPIAuthRequest.h149
-rw-r--r--src/Common/Request/IdentifyRequest.cpp62
-rw-r--r--src/Common/Request/IdentifyRequest.h43
-rw-r--r--src/Common/Request/Makefile.am5
-rw-r--r--src/Common/Request/Makefile.in102
-rw-r--r--src/Common/Request/Request.h1
9 files changed, 411 insertions, 236 deletions
diff --git a/src/Common/Request/DisconnectRequest.cpp b/src/Common/Request/DisconnectRequest.cpp
new file mode 100644
index 0000000..0f8a3c0
--- /dev/null
+++ b/src/Common/Request/DisconnectRequest.cpp
@@ -0,0 +1,67 @@
+/*
+ * DisconnectRequest.cpp
+ *
+ * Copyright (C) 2008 Matthias Schiffer <matthias@gamezock.de>
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "DisconnectRequest.h"
+#include "../RequestManager.h"
+
+namespace Mad {
+namespace Common {
+namespace Request {
+
+bool DisconnectRequest::send(Net::Connection *connection, RequestManager &requestManager, const sigc::slot<void> &callback) {
+ DisconnectRequest *request = new DisconnectRequest();
+
+ request->finished.connect(callback);
+
+ if(requestManager.sendRequest(connection, request))
+ return true;
+
+ delete request;
+ return false;
+}
+
+bool DisconnectRequest::sendRequest(Net::Connection *connection, uint16_t requestId) {
+ if(isSent())
+ return false;
+
+ if(!connection->send(Net::Packet(Net::Packet::DISCONNECT, requestId)))
+ return false;
+
+ setSent();
+ return true;
+}
+
+bool DisconnectRequest::handlePacket(Net::Connection *connection, const Net::Packet &packet) {
+ if(isFinished())
+ return false;
+
+ if(packet.getType() != Net::Packet::OK)
+ return false; // TODO Logging
+
+ connection->disconnect();
+
+ finished();
+
+ setFinished();
+ return true;
+}
+
+}
+}
+}
diff --git a/src/Common/Request/DisconnectRequest.h b/src/Common/Request/DisconnectRequest.h
index 1b2d467..136ef73 100644
--- a/src/Common/Request/DisconnectRequest.h
+++ b/src/Common/Request/DisconnectRequest.h
@@ -21,60 +21,27 @@
#define MAD_COMMON_REQUEST_DISCONNECTREQUEST_H_
#include "Request.h"
-#include "../RequestManager.h"
-#include <Net/Connection.h>
-#include <Net/Packet.h>
#include <sigc++/signal.h>
namespace Mad {
namespace Common {
+
+class RequestManager;
+
namespace Request {
-class DisconnectRequest: public Request {
+class DisconnectRequest : public Request {
private:
sigc::signal<void> finished;
DisconnectRequest() {}
public:
- static bool send(Net::Connection *connection, RequestManager &requestManager, const sigc::slot<void> &callback) {
- DisconnectRequest *request = new DisconnectRequest();
-
- request->finished.connect(callback);
-
- if(requestManager.sendRequest(connection, request))
- return true;
-
- delete request;
- return false;
- }
-
- virtual bool sendRequest(Net::Connection *connection, uint16_t requestId) {
- if(isSent())
- return false;
-
- if(!connection->send(Net::Packet(Net::Packet::DISCONNECT, requestId)))
- return false;
-
- setSent();
- return true;
- }
-
- virtual bool handlePacket(Net::Connection *connection, const Net::Packet &packet) {
- if(isFinished())
- return false;
-
- if(packet.getType() != Net::Packet::OK)
- return false; // TODO Logging
-
- connection->disconnect();
-
- finished();
+ static bool send(Net::Connection *connection, RequestManager &requestManager, const sigc::slot<void> &callback);
- setFinished();
- return true;
- }
+ virtual bool sendRequest(Net::Connection *connection, uint16_t requestId);
+ virtual bool handlePacket(Net::Connection *connection, const Net::Packet &packet);
};
}
diff --git a/src/Common/Request/GSSAPIAuthRequest.cpp b/src/Common/Request/GSSAPIAuthRequest.cpp
new file mode 100644
index 0000000..4387f97
--- /dev/null
+++ b/src/Common/Request/GSSAPIAuthRequest.cpp
@@ -0,0 +1,171 @@
+/*
+ * GSSAPIAuthRequest.cpp
+ *
+ * Copyright (C) 2008 Matthias Schiffer <matthias@gamezock.de>
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "GSSAPIAuthRequest.h"
+#include "../RequestManager.h"
+
+#include <cstring>
+
+#include <iostream>
+
+namespace Mad {
+namespace Common {
+namespace Request {
+
+// TODO Logging & error handling!
+
+GSSAPIAuthRequest::~GSSAPIAuthRequest() {
+ OM_uint32 minStat;
+
+ if(gssServiceName != GSS_C_NO_NAME)
+ gss_release_name(&minStat, &gssServiceName);
+}
+
+bool GSSAPIAuthRequest::send(Net::Connection *connection, RequestManager &requestManager, const std::string &serviceName0) {
+ GSSAPIAuthRequest *request = new GSSAPIAuthRequest(serviceName0);
+
+ if(requestManager.sendRequest(connection, request))
+ return true;
+
+ delete request;
+ return false;
+}
+
+bool GSSAPIAuthRequest::sendRequest(Net::Connection *connection, uint16_t requestId) {
+ if(isSent())
+ return false;
+
+ OM_uint32 majStat, minStat;
+ gss_buffer_desc buffer;
+
+ buffer.length = serviceName.length();
+ buffer.value = std::malloc(buffer.length);
+ std::memcpy(buffer.value, serviceName.c_str(), buffer.length);
+
+ majStat = gss_import_name(&minStat, &buffer, GSS_C_NT_HOSTBASED_SERVICE, &gssServiceName);
+
+ std::free(buffer.value);
+
+ if(majStat != GSS_S_COMPLETE) {
+ gssServiceName = GSS_C_NO_NAME;
+ return false;
+ }
+
+ majStat = gss_init_sec_context(&minStat, GSS_C_NO_CREDENTIAL, &gssContext, gssServiceName, GSS_C_NO_OID, GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG,
+ 0, GSS_C_NO_CHANNEL_BINDINGS, GSS_C_NO_BUFFER, 0, &buffer, 0, 0);
+
+ if(majStat == GSS_S_COMPLETE) {
+ std::cout << "GSS context established." << std::endl;
+ gssContinue = false;
+ }
+ else if(majStat != GSS_S_CONTINUE_NEEDED) {
+ gss_release_buffer(&minStat, &buffer);
+ return false;
+ }
+
+ if(!connection->send(Net::Packet(Net::Packet::GSSAPI_AUTH, requestId, buffer.value, buffer.length))) {
+ gss_release_buffer(&minStat, &buffer);
+ return false;
+ }
+
+ gss_release_buffer(&minStat, &buffer);
+
+ setSent();
+ return true;
+}
+
+bool GSSAPIAuthRequest::handlePacket(Net::Connection *connection, const Net::Packet &packet) {
+ if(isFinished())
+ return false;
+
+ if(packet.getType() != Net::Packet::GSSAPI_AUTH)
+ return false; // TODO Logging
+
+ OM_uint32 majStat, minStat;
+ gss_buffer_desc recvBuffer, sendBuffer;
+
+ if(gssContinue) {
+ recvBuffer.length = packet.getLength();
+ recvBuffer.value = std::malloc(recvBuffer.length);
+ std::memcpy(recvBuffer.value, packet.getData(), recvBuffer.length);
+
+ majStat = gss_init_sec_context(&minStat, GSS_C_NO_CREDENTIAL, &gssContext, gssServiceName, GSS_C_NO_OID, GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG | GSS_C_INTEG_FLAG,
+ 0, GSS_C_NO_CHANNEL_BINDINGS, &recvBuffer, 0, &sendBuffer, 0, 0);
+
+ std::free(recvBuffer.value);
+
+ if(majStat == GSS_S_COMPLETE) {
+ std::cout << "GSS context established." << std::endl;
+ gssContinue = false;
+ }
+ else if(majStat != GSS_S_CONTINUE_NEEDED) {
+ gss_release_buffer(&minStat, &sendBuffer);
+ return false;
+ }
+
+ if(!connection->send(Net::Packet(Net::Packet::GSSAPI_AUTH, packet.getRequestId(), sendBuffer.value, sendBuffer.length))) {
+ gss_release_buffer(&minStat, &sendBuffer);
+ return false;
+ }
+
+ gss_release_buffer(&minStat, &sendBuffer);
+ }
+ else {
+ recvBuffer.length = packet.getLength();
+ recvBuffer.value = std::malloc(recvBuffer.length);
+ std::memcpy(recvBuffer.value, packet.getData(), recvBuffer.length);
+
+ const gnutls_datum_t *cert = connection->getPeerCertificate();
+
+ sendBuffer.length = cert->size;
+ sendBuffer.value = cert->data;
+
+ majStat = gss_verify_mic(&minStat, gssContext, &sendBuffer, &recvBuffer, 0);
+
+ std::free(recvBuffer.value);
+
+ if(majStat != GSS_S_COMPLETE)
+ return false;
+
+ connection->setAuthenticated();
+ std::cout << "Authentication complete." << std::endl;
+
+ majStat = gss_delete_sec_context(&minStat, &gssContext, &sendBuffer);
+
+ if(majStat != GSS_S_COMPLETE) {
+ gss_release_buffer(&minStat, &sendBuffer);
+ return false;
+ }
+
+ if(!connection->send(Net::Packet(Net::Packet::GSSAPI_AUTH, packet.getRequestId(), sendBuffer.value, sendBuffer.length))) {
+ gss_release_buffer(&minStat, &sendBuffer);
+ return false;
+ }
+
+ gss_release_buffer(&minStat, &sendBuffer);
+
+ setFinished();
+ }
+
+ return true;
+}
+
+}
+}
+}
diff --git a/src/Common/Request/GSSAPIAuthRequest.h b/src/Common/Request/GSSAPIAuthRequest.h
index 6882f36..dd2afbb 100644
--- a/src/Common/Request/GSSAPIAuthRequest.h
+++ b/src/Common/Request/GSSAPIAuthRequest.h
@@ -21,19 +21,15 @@
#define MAD_COMMON_REQUEST_GSSAPIAUTHREQUEST_H_
#include "Request.h"
-#include "../RequestManager.h"
-#include <Net/Connection.h>
-#include <Net/Packet.h>
#include <string>
-#include <cstring>
#include <gssapi/gssapi.h>
-#include <iostream>
-
namespace Mad {
namespace Common {
-namespace Request {
+class RequestManager;
+
+namespace Request {
// TODO Logging & error handling!
@@ -48,147 +44,16 @@ class GSSAPIAuthRequest : public Request {
GSSAPIAuthRequest(const std::string &serviceName0) : serviceName(serviceName0), gssServiceName(GSS_C_NO_NAME), gssContext(GSS_C_NO_CONTEXT), gssContinue(true) {}
public:
- virtual ~GSSAPIAuthRequest() {
- OM_uint32 minStat;
-
- if(gssServiceName != GSS_C_NO_NAME)
- gss_release_name(&minStat, &gssServiceName);
- }
-
- static bool send(Net::Connection *connection, RequestManager &requestManager, const std::string &serviceName0) {
- GSSAPIAuthRequest *request = new GSSAPIAuthRequest(serviceName0);
-
- if(requestManager.sendRequest(connection, request))
- return true;
-
- delete request;
- return false;
- }
-
- virtual bool sendRequest(Net::Connection *connection, uint16_t requestId) {
- if(isSent())
- return false;
-
- OM_uint32 majStat, minStat;
- gss_buffer_desc buffer;
-
- buffer.length = serviceName.length();
- buffer.value = std::malloc(buffer.length);
- std::memcpy(buffer.value, serviceName.c_str(), buffer.length);
-
- majStat = gss_import_name(&minStat, &buffer, GSS_C_NT_HOSTBASED_SERVICE, &gssServiceName);
-
- std::free(buffer.value);
-
- if(majStat != GSS_S_COMPLETE) {
- gssServiceName = GSS_C_NO_NAME;
- return false;
- }
-
- majStat = gss_init_sec_context(&minStat, GSS_C_NO_CREDENTIAL, &gssContext, gssServiceName, GSS_C_NO_OID, GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG,
- 0, GSS_C_NO_CHANNEL_BINDINGS, GSS_C_NO_BUFFER, 0, &buffer, 0, 0);
-
- if(majStat == GSS_S_COMPLETE) {
- std::cout << "GSS context established." << std::endl;
- gssContinue = false;
- }
- else if(majStat != GSS_S_CONTINUE_NEEDED) {
- gss_release_buffer(&minStat, &buffer);
- return false;
- }
-
- if(!connection->send(Net::Packet(Net::Packet::GSSAPI_AUTH, requestId, buffer.value, buffer.length))) {
- gss_release_buffer(&minStat, &buffer);
- return false;
- }
-
- gss_release_buffer(&minStat, &buffer);
-
- setSent();
- return true;
- }
-
- virtual bool handlePacket(Net::Connection *connection, const Net::Packet &packet) {
- if(isFinished())
- return false;
+ virtual ~GSSAPIAuthRequest();
- if(packet.getType() != Net::Packet::GSSAPI_AUTH)
- return false; // TODO Logging
+ static bool send(Net::Connection *connection, RequestManager &requestManager, const std::string &serviceName0);
- OM_uint32 majStat, minStat;
- gss_buffer_desc recvBuffer, sendBuffer;
-
- if(gssContinue) {
- recvBuffer.length = packet.getLength();
- recvBuffer.value = std::malloc(recvBuffer.length);
- std::memcpy(recvBuffer.value, packet.getData(), recvBuffer.length);
-
- majStat = gss_init_sec_context(&minStat, GSS_C_NO_CREDENTIAL, &gssContext, gssServiceName, GSS_C_NO_OID, GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG | GSS_C_INTEG_FLAG,
- 0, GSS_C_NO_CHANNEL_BINDINGS, &recvBuffer, 0, &sendBuffer, 0, 0);
-
- std::free(recvBuffer.value);
-
- if(majStat == GSS_S_COMPLETE) {
- std::cout << "GSS context established." << std::endl;
- gssContinue = false;
- }
- else if(majStat != GSS_S_CONTINUE_NEEDED) {
- gss_release_buffer(&minStat, &sendBuffer);
- return false;
- }
-
- if(!connection->send(Net::Packet(Net::Packet::GSSAPI_AUTH, packet.getRequestId(), sendBuffer.value, sendBuffer.length))) {
- gss_release_buffer(&minStat, &sendBuffer);
- return false;
- }
-
- gss_release_buffer(&minStat, &sendBuffer);
- }
- else {
- recvBuffer.length = packet.getLength();
- recvBuffer.value = std::malloc(recvBuffer.length);
- std::memcpy(recvBuffer.value, packet.getData(), recvBuffer.length);
-
- const gnutls_datum_t *cert = connection->getPeerCertificate();
-
- sendBuffer.length = cert->size;
- sendBuffer.value = cert->data;
-
- majStat = gss_verify_mic(&minStat, gssContext, &sendBuffer, &recvBuffer, 0);
-
- std::free(recvBuffer.value);
-
- if(majStat != GSS_S_COMPLETE)
- return false;
-
- connection->setAuthenticated();
- std::cout << "Authentication complete." << std::endl;
-
- majStat = gss_delete_sec_context(&minStat, &gssContext, &sendBuffer);
-
- if(majStat != GSS_S_COMPLETE) {
- gss_release_buffer(&minStat, &sendBuffer);
- return false;
- }
-
- if(!connection->send(Net::Packet(Net::Packet::GSSAPI_AUTH, packet.getRequestId(), sendBuffer.value, sendBuffer.length))) {
- gss_release_buffer(&minStat, &sendBuffer);
- return false;
- }
-
- gss_release_buffer(&minStat, &sendBuffer);
-
- setFinished();
- }
-
- return true;
- }
+ virtual bool sendRequest(Net::Connection *connection, uint16_t requestId);
+ virtual bool handlePacket(Net::Connection *connection, const Net::Packet &packet);
};
}
-
}
-
}
#endif /* MAD_COMMON_REQUEST_GSSAPIAUTHREQUEST_H_ */
diff --git a/src/Common/Request/IdentifyRequest.cpp b/src/Common/Request/IdentifyRequest.cpp
new file mode 100644
index 0000000..5fe4227
--- /dev/null
+++ b/src/Common/Request/IdentifyRequest.cpp
@@ -0,0 +1,62 @@
+/*
+ * IdentifyRequest.cpp
+ *
+ * Copyright (C) 2008 Matthias Schiffer <matthias@gamezock.de>
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "IdentifyRequest.h"
+#include "../RequestManager.h"
+#include <Net/Packet.h>
+
+namespace Mad {
+namespace Common {
+namespace Request {
+
+bool IdentifyRequest::send(Net::Connection *connection, RequestManager &requestManager, const std::string &hostname0) {
+ IdentifyRequest *request = new IdentifyRequest(hostname0);
+
+ if(requestManager.sendRequest(connection, request))
+ return true;
+
+ delete request;
+ return false;
+}
+
+bool IdentifyRequest::sendRequest(Net::Connection *connection, uint16_t requestId) {
+ if(isSent())
+ return false;
+
+ if(!connection->send(Net::Packet(Net::Packet::IDENTIFY, requestId, hostname.c_str(), hostname.length())))
+ return false;
+
+ setSent();
+ return true;
+}
+
+bool IdentifyRequest::handlePacket(Net::Connection*, const Net::Packet &packet) {
+ if(isFinished())
+ return false;
+
+ if(packet.getType() != Net::Packet::OK)
+ return false; // TODO Logging
+
+ setFinished();
+ return true;
+}
+
+}
+}
+}
diff --git a/src/Common/Request/IdentifyRequest.h b/src/Common/Request/IdentifyRequest.h
index 2637e47..276da23 100644
--- a/src/Common/Request/IdentifyRequest.h
+++ b/src/Common/Request/IdentifyRequest.h
@@ -21,55 +21,26 @@
#define MAD_COMMON_REQUEST_IDENTIFYREQUEST_H_
#include "Request.h"
-#include "../RequestManager.h"
-#include <Net/Connection.h>
-#include <Net/Packet.h>
#include <string>
-#include <iostream>
-
namespace Mad {
namespace Common {
+
+class RequestManager;
+
namespace Request {
-class IdentifyRequest: public Request {
+class IdentifyRequest : public Request {
private:
IdentifyRequest(const std::string &hostname0) : hostname(hostname0) {}
std::string hostname;
public:
- static bool send(Net::Connection *connection, RequestManager &requestManager, const std::string &hostname0) {
- IdentifyRequest *request = new IdentifyRequest(hostname0);
-
- if(requestManager.sendRequest(connection, request))
- return true;
-
- delete request;
- return false;
- }
-
- virtual bool sendRequest(Net::Connection *connection, uint16_t requestId) {
- if(isSent())
- return false;
-
- if(!connection->send(Net::Packet(Net::Packet::IDENTIFY, requestId, hostname.c_str(), hostname.length())))
- return false;
-
- setSent();
- return true;
- }
-
- virtual bool handlePacket(Net::Connection*, const Net::Packet &packet) {
- if(isFinished())
- return false;
-
- if(packet.getType() != Net::Packet::OK)
- return false; // TODO Logging
+ static bool send(Net::Connection *connection, RequestManager &requestManager, const std::string &hostname0);
- setFinished();
- return true;
- }
+ virtual bool sendRequest(Net::Connection *connection, uint16_t requestId);
+ virtual bool handlePacket(Net::Connection*, const Net::Packet &packet);
};
}
diff --git a/src/Common/Request/Makefile.am b/src/Common/Request/Makefile.am
index 64c5078..ef75dfe 100644
--- a/src/Common/Request/Makefile.am
+++ b/src/Common/Request/Makefile.am
@@ -1 +1,4 @@
-noinst_HEADERS = DisconnectRequest.h GSSAPIAuthRequest.h IdentifyRequest.h Request.h
+noinst_LTLIBRARIES = librequest.la
+librequest_la_SOURCES = DisconnectRequest.cpp GSSAPIAuthRequest.cpp IdentifyRequest.cpp
+
+noinst_HEADERS = DisconnectRequest.h GSSAPIAuthRequest.h IdentifyRequest.h Request.h
diff --git a/src/Common/Request/Makefile.in b/src/Common/Request/Makefile.in
index 4aa720d..f44ec75 100644
--- a/src/Common/Request/Makefile.in
+++ b/src/Common/Request/Makefile.in
@@ -14,6 +14,7 @@
@SET_MAKE@
+
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -42,8 +43,25 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+librequest_la_LIBADD =
+am_librequest_la_OBJECTS = DisconnectRequest.lo GSSAPIAuthRequest.lo \
+ IdentifyRequest.lo
+librequest_la_OBJECTS = $(am_librequest_la_OBJECTS)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(librequest_la_SOURCES)
+DIST_SOURCES = $(librequest_la_SOURCES)
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
@@ -164,10 +182,13 @@ sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
+noinst_LTLIBRARIES = librequest.la
+librequest_la_SOURCES = DisconnectRequest.cpp GSSAPIAuthRequest.cpp IdentifyRequest.cpp
noinst_HEADERS = DisconnectRequest.h GSSAPIAuthRequest.h IdentifyRequest.h Request.h
all: all-am
.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -198,6 +219,48 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+librequest.la: $(librequest_la_OBJECTS) $(librequest_la_DEPENDENCIES)
+ $(CXXLINK) $(librequest_la_OBJECTS) $(librequest_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DisconnectRequest.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GSSAPIAuthRequest.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IdentifyRequest.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
mostlyclean-libtool:
-rm -f *.lo
@@ -279,7 +342,7 @@ distdir: $(DISTFILES)
done
check-am: all-am
check: check-am
-all-am: Makefile $(HEADERS)
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
installdirs:
install: install-am
install-exec: install-exec-am
@@ -307,11 +370,14 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
-clean-am: clean-generic clean-libtool mostlyclean-am
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+ mostlyclean-am
distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
dvi: dvi-am
@@ -342,12 +408,14 @@ install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
pdf: pdf-am
@@ -362,17 +430,17 @@ uninstall-am:
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libtool ctags distclean distclean-generic \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
- uninstall-am
+ clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/src/Common/Request/Request.h b/src/Common/Request/Request.h
index 5087992..c87d87d 100644
--- a/src/Common/Request/Request.h
+++ b/src/Common/Request/Request.h
@@ -21,6 +21,7 @@
#define MAD_COMMON_REQUEST_REQUEST_H_
#include "../RequestHandler/RequestHandler.h"
+#include <stdint.h>
namespace Mad {
namespace Common {