- Save/load new project settings
[dashstudio.git] / src / dashserver / packagehandlerbase.cpp
blobd73aaace505881ff11829f29f1a279967fc2507d
1 /***************************************************************************
2 * Copyright (C) 2007 by Jorge Cuadrado *
3 * kuadrosxx@gmail.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
21 #include "packagehandlerbase.h"
22 #include <dcore/debug.h>
25 #include <QHashIterator>
26 #include <QHash>
28 #include "users/user.h"
30 #include "connection.h"
31 #include "logger.h"
34 #include <dcore/applicationproperties.h>
36 #include "dash/network/package/error.h"
39 // #include "bans/banmanager.h"
40 // #include "backups/backupmanager.h"
42 #include "package.h"
44 namespace DashServer {
46 struct PackageHandlerBase::Private
50 PackageHandlerBase::PackageHandlerBase() : d(new Private())
54 PackageHandlerBase::~PackageHandlerBase()
56 delete d;
59 void PackageHandlerBase::handlePackage(DashServer::Package *const pkg)
61 DashServer::Connection *cnn = pkg->source();
62 QString root = pkg->root();
63 QString package = pkg->xml();
65 dWarning("server") << "PACKAGE: " << package;
67 TcpServer *server = cnn->server();
68 if(!pkg->isAccepted())
70 handle(cnn, root, package);