summaryrefslogtreecommitdiffstats
path: root/src/Common
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-03-27 01:37:37 +0100
committerMatthias Schiffer <matthias@gamezock.de>2009-03-27 01:37:37 +0100
commitc6f8a170e642b5b1a28bd85857f715846bbadbb4 (patch)
treeff254204358a62ca9da4f2f433370c802f059a33 /src/Common
parent3a219dd11cd05284b8b97f7016c671f0df4a0706 (diff)
downloadmad-c6f8a170e642b5b1a28bd85857f715846bbadbb4.tar
mad-c6f8a170e642b5b1a28bd85857f715846bbadbb4.zip
userInfo() im Mysql-Backend implementiert; UserInfo-Request hinzugefuegt
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/Makefile.in11
-rw-r--r--src/Common/RequestHandlers/Makefile.in11
-rw-r--r--src/Common/Requests/Makefile.am4
-rw-r--r--src/Common/Requests/Makefile.in18
-rw-r--r--src/Common/Requests/UserInfoRequest.cpp36
-rw-r--r--src/Common/Requests/UserInfoRequest.h45
6 files changed, 108 insertions, 17 deletions
diff --git a/src/Common/Makefile.in b/src/Common/Makefile.in
index 45fc07f..8b6b7ef 100644
--- a/src/Common/Makefile.in
+++ b/src/Common/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -223,6 +223,8 @@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pcrecpp_CFLAGS = @pcrecpp_CFLAGS@
+pcrecpp_LIBS = @pcrecpp_LIBS@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
@@ -235,6 +237,7 @@ srcdir = @srcdir@
sys_symbol_underscore = @sys_symbol_underscore@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = Requests RequestHandlers
@@ -258,8 +261,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
@@ -419,7 +422,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
diff --git a/src/Common/RequestHandlers/Makefile.in b/src/Common/RequestHandlers/Makefile.in
index 5a5e778..b7c01a3 100644
--- a/src/Common/RequestHandlers/Makefile.in
+++ b/src/Common/RequestHandlers/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -209,6 +209,8 @@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pcrecpp_CFLAGS = @pcrecpp_CFLAGS@
+pcrecpp_LIBS = @pcrecpp_LIBS@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
@@ -221,6 +223,7 @@ srcdir = @srcdir@
sys_symbol_underscore = @sys_symbol_underscore@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
noinst_LTLIBRARIES = librequesthandlers.la
@@ -234,8 +237,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
@@ -313,7 +316,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
diff --git a/src/Common/Requests/Makefile.am b/src/Common/Requests/Makefile.am
index b5c3bec..00a4bd7 100644
--- a/src/Common/Requests/Makefile.am
+++ b/src/Common/Requests/Makefile.am
@@ -1,4 +1,4 @@
noinst_LTLIBRARIES = librequests.la
-librequests_la_SOURCES = DisconnectRequest.cpp GSSAPIAuthRequest.cpp SimpleRequest.cpp
+librequests_la_SOURCES = DisconnectRequest.cpp GSSAPIAuthRequest.cpp SimpleRequest.cpp UserInfoRequest.cpp
-noinst_HEADERS = DisconnectRequest.h FSInfoRequest.h GSSAPIAuthRequest.h SimpleRequest.h StatusRequest.h UserListRequest.h
+noinst_HEADERS = DisconnectRequest.h FSInfoRequest.h GSSAPIAuthRequest.h SimpleRequest.h StatusRequest.h UserInfoRequest.h UserListRequest.h
diff --git a/src/Common/Requests/Makefile.in b/src/Common/Requests/Makefile.in
index 8533102..0472724 100644
--- a/src/Common/Requests/Makefile.in
+++ b/src/Common/Requests/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -53,7 +53,7 @@ CONFIG_CLEAN_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
librequests_la_LIBADD =
am_librequests_la_OBJECTS = DisconnectRequest.lo GSSAPIAuthRequest.lo \
- SimpleRequest.lo
+ SimpleRequest.lo UserInfoRequest.lo
librequests_la_OBJECTS = $(am_librequests_la_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
@@ -209,6 +209,8 @@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pcrecpp_CFLAGS = @pcrecpp_CFLAGS@
+pcrecpp_LIBS = @pcrecpp_LIBS@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
@@ -221,11 +223,12 @@ srcdir = @srcdir@
sys_symbol_underscore = @sys_symbol_underscore@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
noinst_LTLIBRARIES = librequests.la
-librequests_la_SOURCES = DisconnectRequest.cpp GSSAPIAuthRequest.cpp SimpleRequest.cpp
-noinst_HEADERS = DisconnectRequest.h FSInfoRequest.h GSSAPIAuthRequest.h SimpleRequest.h StatusRequest.h UserListRequest.h
+librequests_la_SOURCES = DisconnectRequest.cpp GSSAPIAuthRequest.cpp SimpleRequest.cpp UserInfoRequest.cpp
+noinst_HEADERS = DisconnectRequest.h FSInfoRequest.h GSSAPIAuthRequest.h SimpleRequest.h StatusRequest.h UserInfoRequest.h UserListRequest.h
all: all-am
.SUFFIXES:
@@ -234,8 +237,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
@@ -280,6 +283,7 @@ distclean-compile:
@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)/SimpleRequest.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UserInfoRequest.Plo@am__quote@
.cpp.o:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -313,7 +317,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
diff --git a/src/Common/Requests/UserInfoRequest.cpp b/src/Common/Requests/UserInfoRequest.cpp
new file mode 100644
index 0000000..455eed6
--- /dev/null
+++ b/src/Common/Requests/UserInfoRequest.cpp
@@ -0,0 +1,36 @@
+/*
+ * UserInfoRequest.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 "UserInfoRequest.h"
+
+namespace Mad {
+namespace Common {
+namespace Requests {
+
+void UserInfoRequest::sendRequest() {
+ Common::XmlPacket packet;
+ packet.setType("GetUserInfo");
+ packet.add("uid", uid);
+
+ sendPacket(packet);
+}
+
+}
+}
+}
diff --git a/src/Common/Requests/UserInfoRequest.h b/src/Common/Requests/UserInfoRequest.h
new file mode 100644
index 0000000..27cf1af
--- /dev/null
+++ b/src/Common/Requests/UserInfoRequest.h
@@ -0,0 +1,45 @@
+/*
+ * UserInfoRequest.h
+ *
+ * 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/>.
+ */
+
+#ifndef MAD_COMMON_REQUESTS_USERINFOREQUEST_H_
+#define MAD_COMMON_REQUESTS_USERINFOREQUEST_H_
+
+#include "../Request.h"
+
+namespace Mad {
+namespace Common {
+namespace Requests {
+
+class UserInfoRequest : public Request {
+ private:
+ unsigned long uid;
+
+ protected:
+ virtual void sendRequest();
+
+ public:
+ UserInfoRequest(Connection *connection, uint16_t requestId, slot_type slot, unsigned long uid0)
+ : Request(connection, requestId, slot), uid(uid0) {}
+};
+
+}
+}
+}
+
+#endif /* MAD_COMMON_REQUESTS_USERINFOREQUEST_H_ */